public interface BambooPermissionManager
Modifier and Type | Field and Description |
---|---|
static org.acegisecurity.adapters.PrincipalAcegiUserToken |
SYSTEM_AUTHORITY |
Modifier and Type | Method and Description |
---|---|
boolean |
canCreateDeploymentProject() |
boolean |
canCreatePlan()
Checks if currently logged in user can create new plans.
|
boolean |
canCreatePlanInProject(Project project)
Checks if currently logged in user can create plans in a
project . |
boolean |
canCreatePlanInProject(String projectKey)
Checks if currently logged in user can create plans in a project identified by
projectKey . |
boolean |
canCreateProject()
Checks if currently logged in user can create new projects.
|
boolean |
canManageAgents()
Returns true if the current user has credentials to manage Bamboo Agents.
|
boolean |
canManageElasticBamboo()
Returns true if the current user has credentials to manage Elastic Bamboo.
|
boolean |
canRunCustomBuild(PlanKey planKey) |
org.acegisecurity.acls.Acl |
getAcl(Object object) |
Collection<String> |
getAdminGroups()
Get a list of all the groups that have global administration permission
|
Collection<String> |
getAdminUsers()
Get a list of all the users that have global administration permission
|
String |
getDefaultUsersGroup() |
Collection<org.acegisecurity.acls.Permission> |
getPermissionsForPlan(PlanKey planKey) |
Collection<String> |
getRestrictedAdminGroups()
Get a list of all the groups that have global restricted administration permission
|
Collection<String> |
getRestrictedAdminUsers()
Get a list of all the users that have global restricted administration permission
|
Collection<String> |
getUsePermissionGroups()
Get a list of all the groups that have global read or create plan permission
|
Collection<String> |
getUsePermissionUsers()
Get a list of all the users that have global read or create plan permission
|
boolean |
hasGlobalPermission(org.acegisecurity.acls.Permission permission) |
com.google.common.base.Predicate<Object> |
hasPermission(BambooPermission permission,
org.acegisecurity.Authentication authentication)
Predicate for {link #hasPermission(permission, object, authentication)}
|
boolean |
hasPermission(org.acegisecurity.acls.Permission permission,
Object object,
org.acegisecurity.Authentication authentication)
Checks whether a permission is granted to access object with given authentication.
|
boolean |
hasPermission(String username,
org.acegisecurity.acls.Permission permission,
Object object) |
boolean |
hasPermissionForAuthority(org.acegisecurity.acls.Permission permission,
Object object,
org.acegisecurity.GrantedAuthority authority)
Checks whether a permission is granted to access object with given authority.
|
boolean |
hasPlanPermission(org.acegisecurity.acls.Permission permission,
ImmutablePlan plan)
Verify plan access
|
boolean |
hasPlanPermission(org.acegisecurity.acls.Permission permission,
PlanKey planKey)
Verify plan access
|
boolean |
hasProjectEditPermission(Project project)
Deprecated.
since 6.2 project EDIT (
BambooPermission.WRITE ) permission replaced with
ADMIN (BambooPermission.ADMINISTRATION ). Use hasPermission(Permission, Object, Authentication)
for permission checking. |
boolean |
hasProjectPermission(org.acegisecurity.acls.Permission permission,
Project project)
Checks if currently logged in user has a
permission for a project . |
boolean |
hasProjectPermission(org.acegisecurity.acls.Permission permission,
String projectKey)
Checks if currently logged in user has a
permission for a project identified by projectKey . |
boolean |
isAdmin(String username)
Returns true if the user is an admin, false if not
|
boolean |
isAllowedToSetGlobalPermission(org.acegisecurity.acls.Permission permission)
Returns true if user is allowed to set specific global permission
|
boolean |
isEnableSignup() |
boolean |
isSystemAdmin(String username)
Returns true if the user is a sysadmin, false if not
|
static final org.acegisecurity.adapters.PrincipalAcegiUserToken SYSTEM_AUTHORITY
boolean hasPermission(@NotNull org.acegisecurity.acls.Permission permission, @NotNull Object object, @Nullable org.acegisecurity.Authentication authentication)
permission
- the permission to check forobject
- the domain object on which the permission check will be madeauthentication
- the authentication/principal whose secure identities will be checked for the permissioncom.google.common.base.Predicate<Object> hasPermission(@NotNull BambooPermission permission, @Nullable org.acegisecurity.Authentication authentication)
permission
- the permission to check forauthentication
- the authentication/principal whose secure identities will be checked for the permissionboolean hasPermission(@NotNull String username, @NotNull org.acegisecurity.acls.Permission permission, @NotNull Object object)
boolean hasPermissionForAuthority(@NotNull org.acegisecurity.acls.Permission permission, @NotNull Object object, @NotNull org.acegisecurity.GrantedAuthority authority)
permission
- the permission to check forobject
- the domain object on which the permission check will be madeauthority
- the authority whose secure identities will be checked for the permissionboolean hasPlanPermission(@NotNull org.acegisecurity.acls.Permission permission, @NotNull PlanKey planKey)
permission
- permission to checkplanKey
- key of the planboolean hasPlanPermission(@NotNull org.acegisecurity.acls.Permission permission, @NotNull ImmutablePlan plan)
permission
- permission to checkplan
- planboolean hasProjectPermission(@NotNull org.acegisecurity.acls.Permission permission, @NotNull String projectKey)
permission
for a project identified by projectKey
.permission
- permission to checkprojectKey
- key of the project to checkboolean hasProjectPermission(@NotNull org.acegisecurity.acls.Permission permission, @NotNull Project project)
permission
for a project
.permission
- permission to checkproject
- project to checkboolean canCreatePlanInProject(@NotNull String projectKey)
projectKey
.projectKey
- key of the project to checkboolean canCreatePlanInProject(@NotNull Project project)
project
.project
- project to checkboolean canCreateProject()
boolean canCreatePlan()
This method might be expensive to compute as it may need to check permissions on all projects for this Bamboo instance.
boolean canCreateDeploymentProject()
boolean hasGlobalPermission(@NotNull org.acegisecurity.acls.Permission permission)
@Deprecated boolean hasProjectEditPermission(@Nullable Project project)
BambooPermission.WRITE
) permission replaced with
ADMIN (BambooPermission.ADMINISTRATION
). Use hasPermission(Permission, Object, Authentication)
for permission checking.boolean isEnableSignup()
Collection<org.acegisecurity.acls.Permission> getPermissionsForPlan(@NotNull PlanKey planKey)
Collection<String> getAdminGroups()
@NotNull Collection<String> getRestrictedAdminGroups()
@NotNull Collection<String> getUsePermissionGroups()
@NotNull Collection<String> getAdminUsers()
@NotNull Collection<String> getRestrictedAdminUsers()
@NotNull Collection<String> getUsePermissionUsers()
@NotNull String getDefaultUsersGroup()
boolean isAdmin(String username)
username
- the userboolean isSystemAdmin(String username)
username
- the userboolean isAllowedToSetGlobalPermission(@NotNull org.acegisecurity.acls.Permission permission)
permission
- permission to checkboolean canManageElasticBamboo()
boolean canManageAgents()
org.acegisecurity.acls.Acl getAcl(@NotNull Object object)
boolean canRunCustomBuild(@NotNull PlanKey planKey)
planKey
- key of the plan in questionCopyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.