Class GrantedAuthorities
java.lang.Object
com.gigaspaces.security.authorities.GrantedAuthorities
- All Implemented Interfaces:
Serializable
Encapsulates the authorities granted to a specific user, to ease access control and authorization
decisions.
- Since:
- 7.0.1
- Author:
- Moran Avigdor
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanEvaluates totrueif has been granted the required privilege, disregarding any classname filters of aSpaceAuthority.booleanEvaluates totrueif has been granted the required privileges to access the specified object.booleanisUserInRole(String role) Returns a boolean indicating whether the authenticated user is included in the specified logical "role".toString()
-
Constructor Details
-
GrantedAuthorities
-
-
Method Details
-
isGranted
Evaluates totrueif has been granted the required privilege, disregarding any classname filters of aSpaceAuthority.- Parameters:
privilege- the required privilege.- Returns:
trueif the required privilege was granted;falseotherwise.
-
isGranted
Evaluates totrueif has been granted the required privileges to access the specified object. The data object parameter is used against one of theSpaceAuthority.Filters; ifnullwill returnfalse. Currently all implemented filters accept an object of typeString.- Parameters:
privilege- the required privilegeobject- the data object (can be null)- Returns:
trueif the required privilege to access the object was granted;falseotherwise.
-
isUserInRole
Returns a boolean indicating whether the authenticated user is included in the specified logical "role".- Parameters:
role- a String specifying the name of the role- Returns:
- a boolean indicating whether the user making this request belongs to a given role; false if the user has not been authenticated
-
getAuthorities
- Returns:
- all populated authorities belonging to this authenticated user
- Since:
- 15.5
-
toString
-