Package ch.ivyteam.ivy.security
Interface IUserToken
-
- All Known Subinterfaces:
ISession,IWorkflowSession
public interface IUserTokenThe user token interface provides some methods for testing if a user can act as (another) certain user or has a certain role. Note that a user token may act as more than one user and has more roles than a certain user because of sessions roles and user substitutions- Since:
- 17.05.2006
- API:
- This is a public API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanActAsUser(IUser user)Tests if the user of this user token currently can act as a certain workflow user.IRoleMatcherhas()Test if the user of this user token currently owns roles.booleanhasRole(IRole role, boolean useSessionRoles)Test if the user of this user token currently owns a role.
-
-
-
Method Detail
-
canActAsUser
boolean canActAsUser(IUser user)
Tests if the user of this user token currently can act as a certain workflow user. Note that this method does not behave likeObject.equals(Object). A user token can act as more than just one workflow user because of substitutions.- Parameters:
user- the workflow user to test- Returns:
- true if token user can act as the workflow user, otherwise false
- See Also:
canActAsUser(IUser, SubstituteInclusion)- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- Session: SESSION MATCHES THIS OR OWNS SessionCanActAsUser PERMISSION OR OWNS SessionCanActAsUser@SYSTEM PERMISSION
Session: SESSION MATCHES THIS OR OWNS SessionCanActAsUser PERMISSION OR OWNS SessionCanActAsUser@SYSTEM PERMISSION
-
hasRole
boolean hasRole(IRole role, boolean useSessionRoles)
Test if the user of this user token currently owns a role. Note, that this method does not behave likeIUser.getRoles(). A user token can have more roles than the user itself, because of a session role or substitutions.- Parameters:
role- the role to testuseSessionRoles- if true the temporary session roles are also checked- Returns:
- true if workflow user has the role,otherwise false
- See Also:
has(),IRoleMatcher.role(IRole),IRoleMatcher.role(String)- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
- Security:
- Session: SESSION MATCHES THIS OR OWNS SessionHasRole PERMISSION OR OWNS SessionHasRole@SYSTEM PERMISSION
Session: SESSION MATCHES THIS OR OWNS SessionHasRole PERMISSION OR OWNS SessionHasRole@SYSTEM PERMISSION
-
has
IRoleMatcher has()
Test if the user of this user token currently owns roles.Note, that this method does not behave like
IUser.getRoles(). A user token can have more roles than the user itself because of substitutions.Example:
ivy.session.has().role("Manager");- Since:
- 9.3
- See Also:
hasRole(ch.ivyteam.ivy.security.IRole, boolean)- API:
- This public API is available in IvyScript and Java. It has the visibility EXPERT.
-
-