Interface PermissionService
public interface PermissionService
Permission service
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addAdminPermission
(com.atlassian.crowd.embedded.api.Group group) Add a group as administrator permission for Profieldsvoid
addAdminPermission
(com.atlassian.jira.user.ApplicationUser applicationUsers) Add a user as administrator permission for Profieldsvoid
addAdminPermissions
(com.atlassian.crowd.embedded.api.Group... groups) Add groups as administrator permission for Profieldsvoid
addAdminPermissions
(com.atlassian.jira.user.ApplicationUser... applicationUsers) Add users as administrator permission for ProfieldsGet the administrator permissions for Profieldsboolean
hasAdminPermissions
(com.atlassian.jira.user.ApplicationUser user) Get if the user has permissionsboolean
hasAssociationPermission
(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project) Get if the user has layout association permission for a projectboolean
hasBulkChangeExecutionPermission
(com.atlassian.jira.user.ApplicationUser applicationUser) Get if the user has BulkChange execution permissionboolean
hasEditFieldValuePermission
(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project, Field field) Get if the user has edit permission for a project field valueboolean
hasEditProjectValuePermission
(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project) Get if the user has edit permission for project valuesboolean
hasFieldAdministratorPermission
(com.atlassian.jira.user.ApplicationUser applicationUser, FieldType fieldType, FieldAdminOperationType operationType) Get if the user has a specific permission for manage the fieldboolean
hasProjectWatcherPermission
(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project) Get whether the user has watcher permission for a projectboolean
hasProjectWatcherToOthersPermission
(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project) Get whether the user has watcher permission to others for a projectboolean
hasViewFieldValuePermission
(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project, Field field) Get if the user has view permission for a project field valueboolean
hasViewProjectValuePermission
(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project) Get if the user has view permission for project valuesboolean
Get if all project admin has administrator permissionsboolean
isJIRAAdmin
(com.atlassian.jira.user.ApplicationUser applicationUser) Get if the user is JIRA Adminboolean
isProjectAdmin
(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project) Get if the user is Project Adminvoid
removeAdminPermission
(com.atlassian.crowd.embedded.api.Group... group) Delete a group.void
removeAdminPermission
(com.atlassian.jira.user.ApplicationUser... applicationUser) Delete a user.void
setAdminPermissionForAllProjectAdmin
(boolean enabled) Set administrator permissions for all project admin
-
Method Details
-
addAdminPermissions
void addAdminPermissions(com.atlassian.jira.user.ApplicationUser... applicationUsers) Add users as administrator permission for Profields- Parameters:
applicationUsers
- Users that will be added
-
addAdminPermission
void addAdminPermission(com.atlassian.jira.user.ApplicationUser applicationUsers) Add a user as administrator permission for Profields- Parameters:
applicationUsers
- An User this will be added
-
removeAdminPermission
void removeAdminPermission(com.atlassian.jira.user.ApplicationUser... applicationUser) Delete a user.- Parameters:
applicationUser
- the user to be deleted
-
addAdminPermissions
void addAdminPermissions(com.atlassian.crowd.embedded.api.Group... groups) Add groups as administrator permission for Profields- Parameters:
groups
- Groups that will be added
-
addAdminPermission
void addAdminPermission(com.atlassian.crowd.embedded.api.Group group) Add a group as administrator permission for Profields- Parameters:
group
- An group this will be added
-
removeAdminPermission
void removeAdminPermission(com.atlassian.crowd.embedded.api.Group... group) Delete a group.- Parameters:
group
- the group to be deleted
-
getAdminPermission
Permissions getAdminPermission()Get the administrator permissions for Profields- Returns:
- the permissions result
-
hasAdminPermissions
boolean hasAdminPermissions(com.atlassian.jira.user.ApplicationUser user) Get if the user has permissions- Parameters:
user
- the user- Returns:
- true if the user has permissions
-
setAdminPermissionForAllProjectAdmin
void setAdminPermissionForAllProjectAdmin(boolean enabled) Set administrator permissions for all project admin- Parameters:
enabled
- true if all users should have permissions
-
isAdminPermissionForAllProjectAdmin
boolean isAdminPermissionForAllProjectAdmin()Get if all project admin has administrator permissions- Returns:
- true if all project admin has permissions
-
isJIRAAdmin
boolean isJIRAAdmin(com.atlassian.jira.user.ApplicationUser applicationUser) Get if the user is JIRA Admin- Parameters:
applicationUser
- User to check JIRA Admin- Returns:
- true if the user is JIRA Admin
-
isProjectAdmin
boolean isProjectAdmin(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project) Get if the user is Project Admin- Parameters:
applicationUser
- User to checkproject
- Project to check- Returns:
- true if the user is Project Admin for the project
-
hasEditProjectValuePermission
boolean hasEditProjectValuePermission(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project) Get if the user has edit permission for project values- Parameters:
applicationUser
- User to check edit permissionproject
- Project to check edit permission- Returns:
- true if the user has edit permission for the project value
-
hasViewProjectValuePermission
boolean hasViewProjectValuePermission(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project) Get if the user has view permission for project values- Parameters:
applicationUser
- User to check view permissionproject
- Project to check view permission- Returns:
- true if the user has view permission for the project value
-
hasAssociationPermission
boolean hasAssociationPermission(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project) Get if the user has layout association permission for a project- Parameters:
applicationUser
- User to check association permissionproject
- Project to check association permission- Returns:
- true if the user has association permission for the project
-
hasProjectWatcherPermission
boolean hasProjectWatcherPermission(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project) Get whether the user has watcher permission for a project- Parameters:
applicationUser
- User to check watcher permissionproject
- Project to check watcher permission- Returns:
- true if the user has project watcher permission in the input project.
-
hasProjectWatcherToOthersPermission
boolean hasProjectWatcherToOthersPermission(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project) Get whether the user has watcher permission to others for a project- Parameters:
applicationUser
- User to check watcher permissionproject
- Project to check watcher permission- Returns:
- true if the user has project watcher permission to others in the input project.
-
hasEditFieldValuePermission
boolean hasEditFieldValuePermission(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project, Field field) Get if the user has edit permission for a project field value- Parameters:
applicationUser
- User to check view permission in fieldproject
- Project where is the fieldfield
- Field to check permission- Returns:
- true if the user has edit permission for the field value in a specific project
-
hasViewFieldValuePermission
boolean hasViewFieldValuePermission(com.atlassian.jira.user.ApplicationUser applicationUser, com.atlassian.jira.project.Project project, Field field) Get if the user has view permission for a project field value- Parameters:
applicationUser
- User to check view permission in fieldproject
- Project where is the fieldfield
- Field to check permission- Returns:
- true if the user has view permission for the field value in a specific project
-
hasFieldAdministratorPermission
boolean hasFieldAdministratorPermission(com.atlassian.jira.user.ApplicationUser applicationUser, FieldType fieldType, FieldAdminOperationType operationType) Get if the user has a specific permission for manage the field- Parameters:
applicationUser
- user to check this permissionfieldType
- Field type to checkoperationType
- Permission to check (Create, Update, Delete)- Returns:
- true if the user has permission
-
hasBulkChangeExecutionPermission
boolean hasBulkChangeExecutionPermission(com.atlassian.jira.user.ApplicationUser applicationUser) Get if the user has BulkChange execution permission- Parameters:
applicationUser
- User to check execution permission- Returns:
- true if the user has execution permission
-