public final class PermissionRequest extends Object
If the request is successful, a Permission
entry will be added to each affected users,
where it can be fetched using SyncUser.retrieveGrantedPermissionsAsync(SyncUser.Callback)
Constructor and Description |
---|
PermissionRequest(UserCondition condition,
String realmUrl,
AccessLevel accessLevel)
Creates a description of a set of permissions granted to some users for some Realms.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
AccessLevel |
getAccessLevel()
Returns the access level that users will be granted if the request is successful.
|
UserCondition |
getCondition()
Returns the
UserCondition used to match users. |
String |
getUrl()
The Realm URL for which the permissions are granted.
|
int |
hashCode() |
String |
toString() |
public PermissionRequest(UserCondition condition, String realmUrl, AccessLevel accessLevel)
realmUrl
- the Realm URL whose permissions settings should be changed. Use *
to change the
permissions of all Realms managed by the user sending this request. The user that wants to grant these permissions
must have administrative rights to those Realms.condition
- the conditions used to match which users are effected.accessLevel
- the AccessLevel
to grant matching users. Setting the access level is absolute i.e., it
may revoke permissions for users that previously had a higher access level. To revoke all permissions, use
AccessLevel.NONE
.public AccessLevel getAccessLevel()
AccessLevel
users will have once this request is successfully handled.public UserCondition getCondition()
UserCondition
used to match users. Those users that match will be granted the the
AccessLevel
defined by getAccessLevel()
.public String getUrl()
*
is returned if the request should match
all Realms, for which the user sending the request, has administrative rights.Permission.mayManage()