[jboss-user] [jBPM] - Re: How can a task script access the currently logged in user?

Maciej Swiderski do-not-reply at jboss.com
Thu Oct 18 07:35:28 EDT 2012


Maciej Swiderski [https://community.jboss.org/people/swiderski.maciej] created the discussion

"Re: How can a task script access the currently logged in user?"

To view the discussion, visit: https://community.jboss.org/message/766651#766651

--------------------------------------------------------------
no it is not accessible in ksession. one way is to get it from thread context

Try following code to get all principles (user and roles):
Subject subject = (Subject) PolicyContext.getContext(javax.security.auth.Subject.container);
Set<Principal> principals = subject.getPrincipals();

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/766651#766651]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20121018/b26f4e95/attachment.html 


More information about the jboss-user mailing list