This content has been marked as final.
Show 2 replies
-
1. Re: How can a task script access the currently logged in user?
swiderski.maciej Oct 18, 2012 7:35 AM (in response to mparaz)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
-
2. Re: How can a task script access the currently logged in user?
mparaz Oct 18, 2012 9:46 AM (in response to mparaz)Thanks! I will try this.