com.atlassian.jira.security.GlobalPermissionManager |
![]() |
Use this manager to add/remove or check global permissions.
The system global permissions are:
SYSTEM_ADMIN
ADMINISTER
USE
USER_PICKER
CREATE_SHARED_OBJECTS
MANAGE_GROUP_FILTER_SUBSCRIPTIONS
BULK_CHANGE
getAllGlobalPermissions()
in order to get the collection of all global permissions, which includes
plugin global permissions.
For project specific permissions use PermissionManager
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Use
addPermission(com.atlassian.jira.permission.GlobalPermissionType, String) instead.
| |||||||||||
Grants a user group a global permission.
| |||||||||||
Returns a global permission matching the specified key.
| |||||||||||
This method is deprecated.
use
getGlobalPermission(GlobalPermissionKey)
to get global permission by key. Eventually, we want to stop referring to Global Permission's by ID.
| |||||||||||
Returns the global permission details for the given permission key.
| |||||||||||
This method is deprecated.
Use
getGroupNamesWithPermission(com.atlassian.jira.permission.GlobalPermissionKey)
| |||||||||||
This method is deprecated.
Use
getGroupNamesWithPermission(com.atlassian.jira.permission.GlobalPermissionKey) instead. Since v6.2.5.
| |||||||||||
Retrieve all the group names with this permission.
| |||||||||||
This method is deprecated.
Use
getGroupsWithPermission(com.atlassian.jira.permission.GlobalPermissionKey) instead. Since v6.2.5.
| |||||||||||
Retrieve all the groups with the given permission.
| |||||||||||
This method is deprecated.
Use
getGroupsWithPermission(com.atlassian.jira.permission.GlobalPermissionKey)
| |||||||||||
This method is deprecated.
Use
getPermissions(com.atlassian.jira.permission.GlobalPermissionKey) instead. Since v6.2.5.
| |||||||||||
This method is deprecated.
Use
getPermissions(com.atlassian.jira.permission.GlobalPermissionKey) instead.
| |||||||||||
Retrieve a list of user groups which have been granted the specified permission.
| |||||||||||
This method is deprecated.
Use
hasPermission(com.atlassian.jira.permission.GlobalPermissionKey, com.atlassian.jira.user.ApplicationUser) instead. Since v6.2.5.
| |||||||||||
This method is deprecated.
Use
hasPermission(com.atlassian.jira.permission.GlobalPermissionKey, com.atlassian.jira.user.ApplicationUser) instead.
| |||||||||||
This method is deprecated.
Use
hasPermission(com.atlassian.jira.permission.GlobalPermissionKey, com.atlassian.jira.user.ApplicationUser) instead.
| |||||||||||
Check if the given user has the given Global Permission.
| |||||||||||
This method is deprecated.
Use
hasPermission(com.atlassian.jira.permission.GlobalPermissionKey, com.atlassian.jira.user.ApplicationUser) instead. Since v6.2.5.
| |||||||||||
This method is deprecated.
Use
GlobalPermissionKey instead of int . Since v6.2.5
| |||||||||||
Checks if jira should be responsible for managing a permission.
| |||||||||||
Revokes a global permission for a user group
| |||||||||||
This method is deprecated.
Use
removePermission(com.atlassian.jira.permission.GlobalPermissionType, String) instead.
| |||||||||||
Revoke all global permissions for a user group.
|
This method is deprecated.
Use addPermission(com.atlassian.jira.permission.GlobalPermissionType, String)
instead.
Grants a user group a global permission.
permissionType | the global permission id. |
---|---|
group | the name of the group. Null means "anyone" group. The JIRA use, admin and sysadmin permission cannot be granted to anyone. |
@Internal
or @PublicApi
.
Grants a user group a global permission.
globalPermissionType | global permission, must not be null. |
---|---|
group | the name of the group. Null means "anyone" group. The JIRA use, admin and sysadmin permission cannot be granted to "anyone". |
@Internal
classes and interfaces can not expect to be compatible with any version
other than the version they were compiled against (even minor version and milestone releases may break binary
compatibility with respect to @Internal
elements).
@Internal
or @PublicApi
.
@Internal
or @PublicApi
.
Returns a global permission matching the specified key.
permissionKey | the key of the permission declared by global permission module. |
---|
@Internal
classes and interfaces can not expect to be compatible with any version
other than the version they were compiled against (even minor version and milestone releases may break binary
compatibility with respect to @Internal
elements).
This method is deprecated.
use getGlobalPermission(GlobalPermissionKey)
to get global permission by key. Eventually, we want to stop referring to Global Permission's by ID.
permissionId | id of the permission. |
---|
@Internal
or @PublicApi
.
Returns the global permission details for the given permission key.
permissionKey | the global permission key |
---|
This method is deprecated.
Use getGroupNamesWithPermission(com.atlassian.jira.permission.GlobalPermissionKey)
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 |
---|
@Internal
classes and interfaces can not expect to be compatible with any version
other than the version they were compiled against (even minor version and milestone releases may break binary
compatibility with respect to @Internal
elements).
This method is deprecated.
Use getGroupNamesWithPermission(com.atlassian.jira.permission.GlobalPermissionKey)
instead. Since v6.2.5.
Retrieve all the group names with this permission. Only group names directly associated with the permission will be returned.
globalPermissionType | global permission, must not be null. |
---|
@Internal
or @PublicApi
.
Retrieve all the group names with this permission. Only group names directly associated with the permission will be returned.
permissionKey | global permission, must not be null. |
---|
@Internal
classes and interfaces can not expect to be compatible with any version
other than the version they were compiled against (even minor version and milestone releases may break binary
compatibility with respect to @Internal
elements).
This method is deprecated.
Use getGroupsWithPermission(com.atlassian.jira.permission.GlobalPermissionKey)
instead. Since v6.2.5.
Retrieve all the groups with this permission. Only groups directly associated with the permission will be returned.
globalPermissionType | global permission, must not be null. |
---|
Group
's, will never be null.@Internal
or @PublicApi
.
Retrieve all the groups with the given permission.
Only groups directly associated with the permission will be returned.
permissionKey | global permission, must not be null. |
---|
Group
's, will never be null.
This method is deprecated.
Use getGroupsWithPermission(com.atlassian.jira.permission.GlobalPermissionKey)
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.@Internal
classes and interfaces can not expect to be compatible with any version
other than the version they were compiled against (even minor version and milestone releases may break binary
compatibility with respect to @Internal
elements).
This method is deprecated.
Use getPermissions(com.atlassian.jira.permission.GlobalPermissionKey)
instead. Since v6.2.5.
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.
globalPermissionType | global permission, must not be null. |
---|
getPermType()
, must never return null.
This method is deprecated.
Use getPermissions(com.atlassian.jira.permission.GlobalPermissionKey)
instead.
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 key of pluggable global permission. Must be a global permission. |
---|
getPermType()
, must never return null.@Internal
or @PublicApi
.
Retrieve a list of user groups which have been granted the specified permission.
The returned GlobalPermissionEntry
contains a reference to the user group.
globalPermissionKey | global permission, must not be null. |
---|
GlobalPermissionEntry
, never null.@Internal
classes and interfaces can not expect to be compatible with any version
other than the version they were compiled against (even minor version and milestone releases may break binary
compatibility with respect to @Internal
elements).
This method is deprecated.
Use hasPermission(com.atlassian.jira.permission.GlobalPermissionKey, com.atlassian.jira.user.ApplicationUser)
instead. Since v6.2.5.
Left in here temporarily in case it is being used by SD 2.0
This method is deprecated.
Use hasPermission(com.atlassian.jira.permission.GlobalPermissionKey, com.atlassian.jira.user.ApplicationUser)
instead.
Check if a global permission is granted for an anonymous user.
If the permission is ADMINISTER
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, ApplicationUser)
method is you have the user object,
i.e. user is not anonymous.
If you are using this method directly, consider using
hasPermission(int, ApplicationUser)
instead as it handles logged in and anonymous users as well.
permissionType | must be global permission |
---|
This method is deprecated.
Use hasPermission(com.atlassian.jira.permission.GlobalPermissionKey, com.atlassian.jira.user.ApplicationUser)
instead.
Check if a global permission for one of the users groups exists.
If the permission type is ADMINISTER
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, ApplicationUser)
instead as it handles logged in and anonymous users as well.
permissionType | must be a global permission |
---|---|
user | must not be null |
@Internal
or @PublicApi
.
Check if the given user has the given Global Permission.
If the permission type is ADMINISTER
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.
globalPermissionKey | global permission, must not be null. |
---|---|
user | The user - can be null indicating "anonymous" |
@Internal
classes and interfaces can not expect to be compatible with any version
other than the version they were compiled against (even minor version and milestone releases may break binary
compatibility with respect to @Internal
elements).
This method is deprecated.
Use hasPermission(com.atlassian.jira.permission.GlobalPermissionKey, com.atlassian.jira.user.ApplicationUser)
instead. Since v6.2.5.
Left in here temporarily in case it is being used by SD 2.0
@Internal
or @PublicApi
.
This method is deprecated.
Use GlobalPermissionKey
instead of int
. Since v6.2.5
permissionId | id of the permission to check. |
---|
@Internal
classes and interfaces can not expect to be compatible with any version
other than the version they were compiled against (even minor version and milestone releases may break binary
compatibility with respect to @Internal
elements).
Checks if jira should be responsible for managing a permission. I.e. in on demand mode USE permission might be managed by User Manager, therefore admin should not be able to add it via jira.
permissionKey | global permission |
---|
@Internal
or @PublicApi
.
Revokes a global permission for a user group
globalPermissionType | global permission, must not be null. |
---|---|
group | the group name. NULL means the anyone group. |
This method is deprecated.
Use removePermission(com.atlassian.jira.permission.GlobalPermissionType, String)
instead.
Revokes a global permission for a user group
permissionType | the global permission. |
---|---|
group | the group name. NULL means the anyone group. |
Revoke all global permissions for a user group.
group | cannot NOT be null and the group must exist. |
---|