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 | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Retrieve all groups that are used in the permission globally and in the project.
| |||||||||||
Returns a project permission matching the specified key.
| |||||||||||
Retrieve a list of project objects this user has the permission for
| |||||||||||
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.
Use
getProjects(ProjectPermissionKey, ApplicationUser, ProjectCategory) instead. Since v6.3.
| |||||||||||
Checks to see if this user has the given permission to the specified issue after the given workflow transition takes effect.
| |||||||||||
This method is deprecated.
Use
hasPermission(ProjectPermissionKey, Issue, ApplicationUser) instead. Since v6.3.
| |||||||||||
This method is deprecated.
Use
hasPermission(com.atlassian.jira.permission.GlobalPermissionKey, com.atlassian.jira.user.ApplicationUser) instead. Since v6.2.5.
| |||||||||||
Checks whether the specified user has a specified permission within the context of a specified project.
| |||||||||||
Checks to see if this user has the given permission to the specified issue if the issue was in the given status.
| |||||||||||
Checks to see if this user has permission to see the specified issue.
| |||||||||||
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.
| |||||||||||
This method is deprecated.
Use
hasPermission(ProjectPermissionKey, Project, ApplicationUser, boolean) instead. Since v6.3.
| |||||||||||
Checks whether a user has a particular permission in the given project.
| |||||||||||
This method is deprecated.
Use
hasProjects(ProjectPermissionKey, ApplicationUser) instead. Since v6.3.
| |||||||||||
Can this user see at least one project with this permission
| |||||||||||
Remove all permissions that have used this group
| |||||||||||
Remove all permissions that have been assigned to this user
|
Retrieve all groups that are used in the permission globally and in the project.
permissionId | permission id |
---|---|
project | project from which to retrieve groups |
Returns 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. |
---|
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 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 - null means find projects with no 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 |
@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 to see if this user has the given permission to the specified issue after the given workflow transition takes effect.
permissionKey | The project permission key. |
---|---|
issue | The Issue (cannot be null) |
user | User object, possibly null if JIRA is accessed anonymously |
actionDescriptor | Represents the current workflow transition |
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 |
This method is deprecated.
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 |
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 |
Checks to see if this user has the given permission to the specified issue if the issue was in the given status.
This method is useful during a workflow transition to check what the permissions will be in the new status, or (after the status is updated in the Issue object) to check what the permission would have been in the old status.
permissionKey | The project permission key. |
---|---|
issue | The Issue (cannot be null) |
user | User object, possibly null if JIRA is accessed anonymously |
status | Represents the state we are checking permissions against |
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.
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 |
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 |
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 |
@Internal
or @PublicApi
.
Checks whether a user has a particular permission in the given project.
This method returns a tri-state enum in order to convey information about permissions that are granted on a per-issue basis.
ISSUE_SPECIFIC
, it may be that there are no issues for which the
user has the permission granted.
permissionKey | A project permission |
---|---|
project | The project that is the context of the permission check. |
user | The person to perform the permission check for (null means anonymous) |
ALL_ISSUES
, NO_ISSUES
, or ISSUE_SPECIFIC
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 |
Can this user see at least one project with this permission
permissionKey | 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 |
---|
Remove all permissions that have been assigned to this user
user | the user whose permissions are to be removed |
---|
RemoveException | |
RemoveException |