com.atlassian.jira.security.PermissionManager |
Known Indirect Subclasses |
Clients of @PublicApi
can expect
that programs compiled against a given version will remain binary compatible with later versions of the
@PublicApi
as per each product's API policy as long as the client does not implement/extend
@PublicApi
interfaces or classes (refer to each product's API policy for the exact
guarantee---usually binary compatibility is guaranteed at least across minor versions).
@PublicApi
interfaces and classes are not designed to be implemented or extended by clients,
we may perform certain types of binary-incompatible changes to these classes and interfaces, but these will not
affect well-behaved clients that do not extend/implement these types (in general, only classes and interfaces
annotated with @PublicSpi
are safe to extend/implement).
PermissionManager responsible for all project specific permissions.
See JIRA Permissions.
For all global Permissions it is recommended to use GlobalPermissionManager
.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This method is deprecated.
Use
createSchemeEntity(GenericValue, com.atlassian.jira.scheme.SchemeEntity)
to add project permissions to a permission scheme. Use addPermission(com.atlassian.jira.permission.GlobalPermissionType, String)
to add global permissions. Since v6.3.
| |||||||||||
Retrieve all groups that are used in the permission globally and in the project.
| |||||||||||
This method is deprecated.
Since v6.0: Use getProjects(int, ApplicationUser) instead.
Since v6.3: Use getProjects(ProjectPermissionKey, ApplicationUser) instead.
| |||||||||||
Returns a project permission matching the specified key.
| |||||||||||
This method is deprecated.
Since v6.0: Use getProjects(int, ApplicationUser, ProjectCategory) instead.
Since v6.3: Use getProjects(ProjectPermissionKey, ApplicationUser, ProjectCategory) instead.
| |||||||||||
This method is deprecated.
Since v5.0: Use getProjects(int, User, ProjectCategory) instead.
Since v6.0: Use getProjects(int, ApplicationUser, ProjectCategory) instead.
Since v6.3: Use getProjects(ProjectPermissionKey, ApplicationUser, ProjectCategory) instead.
| |||||||||||
This method is deprecated.
Use
getProjects(ProjectPermissionKey, ApplicationUser, ProjectCategory) instead. Since v6.3.
| |||||||||||
This method is deprecated.
Use
getProjects(ProjectPermissionKey, ApplicationUser) instead. Since v6.3.
| |||||||||||
Returns the list of projects associated with the specified category, that this user has the permissions for.
| |||||||||||
This method is deprecated.
Please use
getProjectObjects(int, com.atlassian.crowd.embedded.api.User) . Since v4.3
| |||||||||||
Retrieve a list of project objects this user has the permission for
| |||||||||||
This method is deprecated.
Use
hasPermission(com.atlassian.jira.permission.GlobalPermissionType, ApplicationUser) instead. Since v6.3.Use hasPermission(com.atlassian.jira.permission.GlobalPermissionKey, com.atlassian.jira.user.ApplicationUser) instead. Since v6.2.5.
| |||||||||||
This method is deprecated.
Since v6.0: Use hasPermission(int, Project, ApplicationUser) instead.
Since v6.3: Use hasPermission(ProjectPermissionKey, Project, ApplicationUser) instead.
| |||||||||||
Checks whether the specified user has a specified permission within the context of a specified project.
| |||||||||||
Checks whether the specified user has a specified permission within the context of a specified project.
| |||||||||||
This method is deprecated.
Since v3.11: Use hasPermission(int, Issue, User) for Issues or
hasPermission(int, Project, User, boolean) for Projects.
Since v6.0: Use hasPermission(int, Issue, ApplicationUser) for
Issues or hasPermission(int, Project, ApplicationUser, boolean) for
Projects.
Since v6.3: Use hasPermission(ProjectPermissionKey, Issue, ApplicationUser) for
Issues or hasPermission(ProjectPermissionKey, Project, ApplicationUser, boolean) for
Projects.
| |||||||||||
This method is deprecated.
Since v6.0: Use hasPermission(int, Project, ApplicationUser, boolean) instead.
Since v6.3: Use hasPermission(ProjectPermissionKey, Project, ApplicationUser, boolean) instead.
| |||||||||||
This method is deprecated.
Use
hasPermission(ProjectPermissionKey, Project, ApplicationUser, boolean) instead. Since v6.3.
| |||||||||||
This method is deprecated.
Use
hasPermission(int, ApplicationUser) instead. Since v6.0. | |||||||||||
This method is deprecated.
Since v6.0: Use hasPermission(int, Issue, ApplicationUser) instead.
Since v6.3: Use hasPermission(ProjectPermissionKey, Issue, ApplicationUser) instead.
| |||||||||||
Checks to see if this user has permission to see the specified issue.
| |||||||||||
This method is deprecated.
Since v3.11: Use hasPermission(int, Issue, User) for Issues or
hasPermission(int, Project, User) for Projects.
Since v6.0: Use hasPermission(int, Issue, ApplicationUser) for Issues or
hasPermission(int, Project, ApplicationUser) for Projects.
Since v6.3: Use hasPermission(ProjectPermissionKey, Issue, ApplicationUser) for Issues or
hasPermission(ProjectPermissionKey, Project, ApplicationUser) for Projects.
| |||||||||||
This method is deprecated.
Use
hasPermission(ProjectPermissionKey, Project, ApplicationUser) instead. Since v6.3.
| |||||||||||
This method is deprecated.
Use
hasPermission(ProjectPermissionKey, Issue, ApplicationUser) instead. Since v6.3.
| |||||||||||
Can this user see at least one project with this permission
| |||||||||||
This method is deprecated.
Use
hasProjects(ProjectPermissionKey, ApplicationUser) instead. Since v6.3.
| |||||||||||
This method is deprecated.
Use
hasProjects(ProjectPermissionKey, ApplicationUser) instead. Since v6.3.
| |||||||||||
Remove all permissions that have used this group
| |||||||||||
This method is deprecated.
Use
removeUserPermissions(ApplicationUser) instead. Since v6.0.
| |||||||||||
Remove all permissions that have been assigned to this user
|
This method is deprecated.
Use createSchemeEntity(GenericValue, com.atlassian.jira.scheme.SchemeEntity)
to add project permissions to a permission scheme. Use addPermission(com.atlassian.jira.permission.GlobalPermissionType, String)
to add global permissions. Since v6.3.
Grants a permission to the system.
permissionsId | Permissions value. E.g. See ADMINISTER |
---|---|
scheme | If null permission is global otherwise it is added to the scheme |
parameter | Used for e.g. group name |
securityType | e.g. GroupDropdown.DESC |
CreateException | if permission creation fails |
---|
Retrieve all groups that are used in the permission globally and in the project.
permissionId | permission id |
---|---|
project | project from which to retrieve groups |
This method is deprecated.
Since v6.0: Use getProjects(int, ApplicationUser)
instead.
Since v6.3: Use getProjects(ProjectPermissionKey, ApplicationUser)
instead.
Retrieve a list of project objects this user has the permission for
permissionId | must NOT be a global permission |
---|---|
user | user |
Project
objectsReturns a project permission matching the specified key.
permissionKey | A project permission key. |
---|
none()
if there is no permission with this key.category | project permission category. |
---|
This method is deprecated.
Since v6.0: Use getProjects(int, ApplicationUser, ProjectCategory)
instead.
Since v6.3: Use getProjects(ProjectPermissionKey, ApplicationUser, ProjectCategory)
instead.
Returns the list of projects associated with the specified category, that this user has the permissions for.
permissionId | permission id |
---|---|
user | user |
projectCategory | the ProjectCategory |
This method is deprecated.
Since v5.0: Use getProjects(int, User, ProjectCategory)
instead.
Since v6.0: Use getProjects(int, ApplicationUser, ProjectCategory)
instead.
Since v6.3: Use getProjects(ProjectPermissionKey, ApplicationUser, ProjectCategory)
instead.
Retrieve a list of projects associated with the specified category, that this user has the permissions for
permissionId | permission id |
---|---|
user | user |
category | GenericValue representing category |
This method is deprecated.
Use getProjects(ProjectPermissionKey, ApplicationUser, ProjectCategory)
instead. Since v6.3.
Returns the list of projects associated with the specified category, that this user has the permissions for.
permissionId | permission id |
---|---|
user | user |
projectCategory | the ProjectCategory |
This method is deprecated.
Use getProjects(ProjectPermissionKey, ApplicationUser)
instead. Since v6.3.
Retrieve a list of project objects this user has the permission for
permissionId | must NOT be a global permission |
---|---|
user | user |
Project
objectsReturns the list of projects associated with the specified category, that this user has the permissions for.
permissionKey | permission key |
---|---|
user | user |
projectCategory | the ProjectCategory |
This method is deprecated.
Please use getProjectObjects(int, com.atlassian.crowd.embedded.api.User)
. Since v4.3
Retrieve a list of projects this user has the permission for
permissionId | must NOT be a global permission |
---|---|
user | user |
Retrieve a list of project objects this user has the permission for
permissionKey | must NOT be a global permission |
---|---|
user | user |
Project
objects
This method is deprecated.
Use hasPermission(com.atlassian.jira.permission.GlobalPermissionType, ApplicationUser)
instead. Since v6.3.Use hasPermission(com.atlassian.jira.permission.GlobalPermissionKey, com.atlassian.jira.user.ApplicationUser)
instead. Since v6.2.5.
Checks to see if this user has the specified permission. It will check only global permissions as there are no other permissions to check.
permissionsId | permission id |
---|---|
user | user, can be null - anonymous user |
This method is deprecated.
Since v6.0: Use hasPermission(int, Project, ApplicationUser)
instead.
Since v6.3: Use hasPermission(ProjectPermissionKey, Project, ApplicationUser)
instead.
Checks whether the specified user has a specified permission within the context of a specified project.
permissionsId | A non-global permission, i.e. a permission that is granted via a project context |
---|---|
project | The project that is the context of the permission check. |
user | The person to perform the permission check for |
Checks whether the specified user has a specified permission within the context of a specified project.
permissionKey | A non-global permission, i.e. a permission that is granted via a project context |
---|---|
project | The project that is the context of the permission check. |
user | The person to perform the permission check for |
Checks whether the specified user has a specified permission within the context of a specified project.
permissionKey | A non-global permission, i.e. a permission that is granted via a project context |
---|---|
project | The project that is the context of the permission check. |
user | The person to perform the permission check for |
issueCreation | Whether this permission is being checked during issue creation |
This method is deprecated.
Since v3.11: Use hasPermission(int, Issue, User)
for Issues or
hasPermission(int, Project, User, boolean)
for Projects.
Since v6.0: Use hasPermission(int, Issue, ApplicationUser)
for
Issues or hasPermission(int, Project, ApplicationUser, boolean)
for
Projects.
Since v6.3: Use hasPermission(ProjectPermissionKey, Issue, ApplicationUser)
for
Issues or hasPermission(ProjectPermissionKey, Project, ApplicationUser, boolean)
for
Projects.
Does the same as hasPermission(int, org.ofbiz.core.entity.GenericValue, User)
except
the entity is a project GenericValue.
permissionsId | Not a global permission |
---|---|
project | Not null. |
user | User object, possibly null if JIRA is accessed anonymously |
issueCreation | Whether this permission is being checked during issue creation |
This method is deprecated.
Since v6.0: Use hasPermission(int, Project, ApplicationUser, boolean)
instead.
Since v6.3: Use hasPermission(ProjectPermissionKey, Project, ApplicationUser, boolean)
instead.
Checks whether the specified user has a specified permission within the context of a specified project.
permissionsId | A non-global permission, i.e. a permission that is granted via a project context |
---|---|
project | The project that is the context of the permission check. |
user | The person to perform the permission check for |
issueCreation | Whether this permission is being checked during issue creation |
This method is deprecated.
Use hasPermission(ProjectPermissionKey, Project, ApplicationUser, boolean)
instead. Since v6.3.
Checks whether the specified user has a specified permission within the context of a specified project.
permissionsId | A non-global permission, i.e. a permission that is granted via a project context |
---|---|
project | The project that is the context of the permission check. |
user | The person to perform the permission check for |
issueCreation | Whether this permission is being checked during issue creation |
This method is deprecated.
Use hasPermission(int, ApplicationUser)
instead. Since v6.0.
Checks to see if this user has the specified permission. It will check only global permissions as there are no other permissions to check.
permissionsId | permission id |
---|---|
user | user, can be null - anonymous user |
This method is deprecated.
Since v6.0: Use hasPermission(int, Issue, ApplicationUser)
instead.
Since v6.3: Use hasPermission(ProjectPermissionKey, Issue, ApplicationUser)
instead.
Checks to see if this user has permission to see the specified issue.
Note that if the issue's generic value is null, it is assumed that the issue is currently being created, and so the permission check call is deferred to the issue's project object, with the issueCreation flag set to true. See JRA-14788 for more info.permissionsId | Not a global permission |
---|---|
issue | The Issue (cannot be null) |
user | User object, possibly null if JIRA is accessed anonymously |
Checks to see if this user has permission to see the specified issue.
Note that if the issue's generic value is null, it is assumed that the issue is currently being created, and so the permission check call is deferred to the issue's project object, with the issueCreation flag set to true. See JRA-14788 for more info.permissionKey | Not a global permission key |
---|---|
issue | The Issue (cannot be null) |
user | User object, possibly null if JIRA is accessed anonymously |
This method is deprecated.
Since v3.11: Use hasPermission(int, Issue, User)
for Issues or
hasPermission(int, Project, User)
for Projects.
Since v6.0: Use hasPermission(int, Issue, ApplicationUser)
for Issues or
hasPermission(int, Project, ApplicationUser)
for Projects.
Since v6.3: Use hasPermission(ProjectPermissionKey, Issue, ApplicationUser)
for Issues or
hasPermission(ProjectPermissionKey, Project, ApplicationUser)
for Projects.
Checks to see if this has permission to see the specified entity. Check Permissions scheme(s) if the entity is project. Check Permissions scheme(s) and issue level security scheme(s) if the entity is an issue.
permissionsId | Not a global permission |
---|---|
entity | Not null. Must be either an issue or project. |
u | User object, possibly null if JIRA is accessed anonymously |
IllegalArgumentException | If the entity supplied is NOT an issue or project. |
---|
This method is deprecated.
Use hasPermission(ProjectPermissionKey, Project, ApplicationUser)
instead. Since v6.3.
Checks whether the specified user has a specified permission within the context of a specified project.
permissionsId | A non-global permission, i.e. a permission that is granted via a project context |
---|---|
project | The project that is the context of the permission check. |
user | The person to perform the permission check for |
This method is deprecated.
Use hasPermission(ProjectPermissionKey, Issue, ApplicationUser)
instead. Since v6.3.
Checks to see if this user has permission to see the specified issue.
Note that if the issue's generic value is null, it is assumed that the issue is currently being created, and so the permission check call is deferred to the issue's project object, with the issueCreation flag set to true. See JRA-14788 for more info.permissionsId | Not a global permission |
---|---|
issue | The Issue (cannot be null) |
user | User object, possibly null if JIRA is accessed anonymously |
Can this user see at least one project with this permission
permissionKey | must NOT be a global permission |
---|---|
user | user being checked |
This method is deprecated.
Use hasProjects(ProjectPermissionKey, ApplicationUser)
instead. Since v6.3.
Can this user see at least one project with this permission
permissionId | must NOT be a global permission |
---|---|
user | user being checked |
This method is deprecated.
Use hasProjects(ProjectPermissionKey, ApplicationUser)
instead. Since v6.3.
Can this user see at least one project with this permission
permissionId | must NOT be a global permission |
---|---|
user | user being checked |
Remove all permissions that have used this group
group | The name of the group that needs to be removed, must NOT be null and must be a real group |
---|
RemoveException | if permission removal fails |
---|
This method is deprecated.
Use removeUserPermissions(ApplicationUser)
instead. Since v6.0.
Remove all permissions that have used this username
username | username of the user whose permissions are to be removed |
---|
RemoveException | if permission removal fails |
---|
Remove all permissions that have been assigned to this user
user | the user whose permissions are to be removed |
---|
RemoveException | |
RemoveException |