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.booleanisPiiGranted(SpaceAuthority.SpacePrivilege privilege, String typeName, String propertyName, String spaceName) Evaluates totrueif has been granted the required PII privilege on the specified property.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.
-
isPiiGranted
public boolean isPiiGranted(SpaceAuthority.SpacePrivilege privilege, String typeName, String propertyName, String spaceName) Evaluates totrueif has been granted the required PII privilege on the specified property. A PII privilege is granted if it has no filter, or has aSpaceAuthority.FieldFilteraccepting the property (or aSpaceAuthority.SpaceFieldFilteraccepting it in the space), or has aSpaceAuthority.SpacenameFilteraccepting the space name.- Parameters:
privilege-SpaceAuthority.SpacePrivilege.READ_PIIorSpaceAuthority.SpacePrivilege.WRITE_PIItypeName- the type namepropertyName- the PII property namespaceName- the space name (can be null)- Since:
- 18.0.1
-
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
-