JBoss Community

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

created by Maciej Swiderski in jBPM - View the full discussion

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

Start a new discussion in jBPM at Community