public final class GrantedAuthorities extends Object implements Serializable
Constructor and Description |
---|
GrantedAuthorities(Authority[] authorities) |
Modifier and Type | Method and Description |
---|---|
boolean |
isGranted(Privilege privilege)
Evaluates to
true if has been granted the required privilege, disregarding any
classname filters of a SpaceAuthority . |
boolean |
isGranted(Privilege privilege,
Object object)
Evaluates to
true if has been granted the required
privileges to access the specified object. |
boolean |
isUserInRole(String role)
Returns a boolean indicating whether the authenticated user is included
in the specified logical "role".
|
public GrantedAuthorities(Authority[] authorities)
public boolean isGranted(Privilege privilege)
true
if has been granted the required privilege, disregarding any
classname filters of a SpaceAuthority
.privilege
- the required privilege.true
if the required privilege was granted; false
otherwise.public boolean isGranted(Privilege privilege, Object object)
true
if has been granted the required
privileges to access the specified object. The data object parameter is
used against one of the SpaceAuthority.Filter
s; if
null
will return false
. Currently all
implemented filters accept an object of type String
.privilege
- the required privilegeobject
- the data object (can be null)true
if the required privilege to access the object
was granted; false
otherwise.public boolean isUserInRole(String role)
role
- a String specifying the name of the roleCopyright © GigaSpaces.