com.atlassian.jira.security.GlobalPermissionManager |
Known Indirect Subclasses |
Use this manager to add/remove or check the following global permissions.
Global permissions are:
SYSTEM_ADMIN
ADMINISTER
USE
USER_PICKER
CREATE_SHARED_OBJECTS
MANAGE_GROUP_FILTER_SUBSCRIPTIONS
BULK_CHANGE
PermissionManager
.
To check programmatically if a permission is global use isGlobalPermission(int)
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Grants a user group a global permission.
| |||||||||||
Retrieve all the group names with this permission.
| |||||||||||
Retrieve all the groups with this permission.
| |||||||||||
Retrieve a list of user groups which have been granted a specified permission.
| |||||||||||
Check if a global permission for one of the users groups exists.
| |||||||||||
This method is deprecated.
Use
hasPermission(int, ApplicationUser) instead. Since v6.0.
| |||||||||||
Check if a global permission is granted for an anonymous user.
| |||||||||||
Revokes a global permission for a user group
| |||||||||||
Revoke all global permissions for a user group.
|
Grants a user group a global permission.
permissionType | the global permission. |
---|---|
group | the name of the group. Null means "anyone" group. The JIRA use permission cannot be granted to anyone. |
CreateException | if the permission creation fails |
---|
Retrieve all the group names with this permission. Only group names directly associated with the permission will be returned.
permissionId | must be a global permission |
---|
Retrieve all the groups with this permission. Only groups directly associated with the permission will be returned.
permissionId | must be a global permission |
---|
Group
's, will never be null.
Retrieve a list of user groups which have been granted a specified permission.
The returned JiraPermission
contains a reference to the user group.
getScheme()
is always NULL, because Global permission are not configured using schemes.
getType()
will always return "group", because global permissions can only be granted to groups.
permissionType | The permission. Must be a global permission. |
---|
getPermType()
, must never return null.
Check if a global permission for one of the users groups exists.
If the permission type isADMINISTER
and the lookup is false then the same
query will be executed for the SYSTEM_ADMIN
permission type, since
it is implied that having a SYSTEM_ADMIN
permission grants
ADMINISTER
rights.
Note: Use hasPermission(int)
method is you do not have the user object, i.e. user is anonymous.
If you are using this method directly, consider using
hasPermission(int, User)
instead as it handles logged in and anonymous users as well.permissionType | must be a global permission |
---|---|
user | must not be null |
This method is deprecated.
Use hasPermission(int, ApplicationUser)
instead. Since v6.0.
Check if a global permission for one of the users groups exists.
If the permission type isADMINISTER
and the lookup is false then the same
query will be executed for the SYSTEM_ADMIN
permission type, since
it is implied that having a SYSTEM_ADMIN
permission grants
ADMINISTER
rights.
Note: Use hasPermission(int)
method is you do not have the user object, i.e. user is anonymous.
If you are using this method directly, consider using
hasPermission(int, User)
instead as it handles logged in and anonymous users as well.permissionType | must be a global permission |
---|---|
user | must not be null |
Check if a global permission is granted for an anonymous user.
If the permission isADMINISTER
and the lookup is false then the same
query will be executed for the SYSTEM_ADMIN
permission type, since
it is implied that having a SYSTEM_ADMIN
permission grants
ADMINISTER
rights.
Note: Use hasPermission(int, User)
method is you have the user object,
i.e. user is not anonymous.
If you are using this method directly, consider using
hasPermission(int, User)
instead as it handles logged in and anonymous users as well.permissionType | must be global permission |
---|
Revokes a global permission for a user group
permissionType | the global permission. |
---|---|
group | the group name. NULL means the anyone group. |
RemoveException | if the permission removal fails |
---|
Revoke all global permissions for a user group.
group | cannot NOT be null and the group must exist. |
---|
RemoveException | if the permission removal fails |
---|