public class BambooPermissionManagerImpl extends Object implements BambooPermissionManager
Modifier and Type | Field and Description |
---|---|
protected org.acegisecurity.acls.MutableAclService |
aclService |
SYSTEM_AUTHORITY
Constructor and Description |
---|
BambooPermissionManagerImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
canCreateDeploymentProject() |
boolean |
canCreatePlan()
Checks if currently logged in user can create new plans.
|
boolean |
canCreatePlanInProject(@NotNull Project project)
Checks if currently logged in user can create plans in a
project . |
boolean |
canCreatePlanInProject(@NotNull 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(@NotNull PlanKey planKey) |
protected org.acegisecurity.acls.objectidentity.ObjectIdentity |
createObjectIdentity(@NotNull Object object) |
org.acegisecurity.acls.Acl |
getAcl(@NotNull Object object) |
@NotNull Collection<String> |
getAdminGroups()
Get a list of all the groups that have global administration permission
|
@NotNull Collection<String> |
getAdminUsers()
Get a list of all the users that have global administration permission
|
@NotNull String |
getDefaultUsersGroup() |
@NotNull Collection<String> |
getGroupsWithPermission(BambooPermission permission) |
Collection<org.acegisecurity.acls.Permission> |
getPermissionsForPlan(@NotNull PlanKey planKey) |
@NotNull Collection<String> |
getRestrictedAdminGroups()
Get a list of all the groups that have global restricted administration permission
|
@NotNull Collection<String> |
getRestrictedAdminUsers()
Get a list of all the users that have global restricted administration permission
|
@NotNull Collection<String> |
getUsePermissionGroups()
Get a list of all the groups that have global read or create plan permission
|
@NotNull Collection<String> |
getUsePermissionUsers()
Get a list of all the users that have global read or create plan permission
|
@NotNull Collection<String> |
getUsersWithPermission(BambooPermission permission) |
boolean |
hasGlobalPermission(@NotNull org.acegisecurity.acls.Permission permission) |
com.google.common.base.Predicate<Object> |
hasPermission(@NotNull BambooPermission permission,
@Nullable org.acegisecurity.Authentication authentication)
Predicate for {link #hasPermission(permission, object, authentication)}
|
protected boolean |
hasPermission(@NotNull org.acegisecurity.acls.Permission permission,
@NotNull HibernateObjectIdentityImpl objectIdentity,
@NotNull org.acegisecurity.Authentication authentication) |
boolean |
hasPermission(@NotNull org.acegisecurity.acls.Permission permission,
@NotNull Object object,
@Nullable org.acegisecurity.Authentication authentication)
Checks whether a permission is granted to access object with given authentication.
|
protected boolean |
hasPermission(@NotNull org.acegisecurity.acls.Permission permission,
@NotNull org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity,
@NotNull org.acegisecurity.Authentication authentication) |
boolean |
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)
Checks whether a permission is granted to access object with given authority.
|
boolean |
hasPlanPermission(@NotNull org.acegisecurity.acls.Permission permission,
@NotNull ImmutablePlan plan)
Verify plan access
|
boolean |
hasPlanPermission(@NotNull org.acegisecurity.acls.Permission permission,
@NotNull PlanKey planKey)
Verify plan access
|
boolean |
hasProjectEditPermission(@Nullable Project project) |
boolean |
hasProjectPermission(@NotNull org.acegisecurity.acls.Permission permission,
@NotNull Project project)
Checks if currently logged in user has a
permission for a project . |
boolean |
hasProjectPermission(@NotNull org.acegisecurity.acls.Permission permission,
@NotNull 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(@NotNull org.acegisecurity.acls.Permission permission)
Returns true if user is allowed to set specific global permission
|
boolean |
isEnableSignup() |
protected boolean |
isPermissionSuppressedByTokenAuthorisation(@NotNull org.acegisecurity.acls.Permission permission) |
boolean |
isSystemAdmin(String username)
Returns true if the user is a sysadmin, false if not
|
protected org.acegisecurity.acls.Acl |
readAclById(org.acegisecurity.acls.objectidentity.ObjectIdentity identity) |
void |
setAclService(org.acegisecurity.acls.MutableAclService aclService) |
void |
setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor) |
void |
setCachedPlanManager(CachedPlanManager cachedPlanManager) |
void |
setObjectIdentityRetrievalStrategy(org.acegisecurity.acls.objectidentity.ObjectIdentityRetrievalStrategy objectIdentityRetrievalStrategy) |
void |
setOverrideAuthorities(org.acegisecurity.GrantedAuthority[] overrideAuthorities) |
void |
setProjectManager(ProjectManager projectManager) |
void |
setSidRetrievalStrategy(org.acegisecurity.acls.sid.SidRetrievalStrategy sidRetrievalStrategy) |
public boolean hasPermission(@NotNull @NotNull org.acegisecurity.acls.Permission permission, @NotNull @NotNull Object object, @Nullable @Nullable org.acegisecurity.Authentication authentication)
BambooPermissionManager
hasPermission
in interface BambooPermissionManager
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 permissionprotected boolean isPermissionSuppressedByTokenAuthorisation(@NotNull @NotNull org.acegisecurity.acls.Permission permission)
public com.google.common.base.Predicate<Object> hasPermission(@NotNull @NotNull BambooPermission permission, @Nullable @Nullable org.acegisecurity.Authentication authentication)
BambooPermissionManager
hasPermission
in interface BambooPermissionManager
permission
- the permission to check forauthentication
- the authentication/principal whose secure identities will be checked for the permissionpublic boolean hasPermissionForAuthority(@NotNull @NotNull org.acegisecurity.acls.Permission permission, @NotNull @NotNull Object object, @NotNull @NotNull org.acegisecurity.GrantedAuthority authority)
BambooPermissionManager
hasPermissionForAuthority
in interface BambooPermissionManager
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 permissionpublic org.acegisecurity.acls.Acl getAcl(@NotNull @NotNull Object object)
getAcl
in interface BambooPermissionManager
protected org.acegisecurity.acls.Acl readAclById(org.acegisecurity.acls.objectidentity.ObjectIdentity identity)
public boolean hasPermission(@NotNull @NotNull String username, @NotNull @NotNull org.acegisecurity.acls.Permission permission, @NotNull @NotNull Object object)
hasPermission
in interface BambooPermissionManager
public boolean hasPlanPermission(@NotNull @NotNull org.acegisecurity.acls.Permission permission, @NotNull @NotNull PlanKey planKey)
BambooPermissionManager
hasPlanPermission
in interface BambooPermissionManager
permission
- permission to checkplanKey
- key of the planpublic boolean hasPlanPermission(@NotNull @NotNull org.acegisecurity.acls.Permission permission, @NotNull @NotNull ImmutablePlan plan)
BambooPermissionManager
hasPlanPermission
in interface BambooPermissionManager
permission
- permission to checkplan
- planpublic boolean hasProjectPermission(@NotNull @NotNull org.acegisecurity.acls.Permission permission, @NotNull @NotNull String projectKey)
BambooPermissionManager
permission
for a project identified by projectKey
.hasProjectPermission
in interface BambooPermissionManager
permission
- permission to checkprojectKey
- key of the project to checkpublic boolean hasProjectPermission(@NotNull @NotNull org.acegisecurity.acls.Permission permission, @NotNull @NotNull Project project)
BambooPermissionManager
permission
for a project
.hasProjectPermission
in interface BambooPermissionManager
permission
- permission to checkproject
- project to checkpublic boolean canCreatePlanInProject(@NotNull @NotNull String projectKey)
BambooPermissionManager
projectKey
.canCreatePlanInProject
in interface BambooPermissionManager
projectKey
- key of the project to checkpublic boolean canCreatePlanInProject(@NotNull @NotNull Project project)
BambooPermissionManager
project
.canCreatePlanInProject
in interface BambooPermissionManager
project
- project to checkpublic boolean canCreateProject()
BambooPermissionManager
canCreateProject
in interface BambooPermissionManager
public boolean canCreatePlan()
BambooPermissionManager
This method might be expensive to compute as it may need to check permissions on all projects for this Bamboo instance.
canCreatePlan
in interface BambooPermissionManager
public boolean canCreateDeploymentProject()
canCreateDeploymentProject
in interface BambooPermissionManager
public boolean hasGlobalPermission(@NotNull @NotNull org.acegisecurity.acls.Permission permission)
hasGlobalPermission
in interface BambooPermissionManager
public Collection<org.acegisecurity.acls.Permission> getPermissionsForPlan(@NotNull @NotNull PlanKey planKey)
getPermissionsForPlan
in interface BambooPermissionManager
public boolean hasProjectEditPermission(@Nullable @Nullable Project project)
hasProjectEditPermission
in interface BambooPermissionManager
public boolean isEnableSignup()
isEnableSignup
in interface BambooPermissionManager
@NotNull public @NotNull Collection<String> getAdminGroups()
BambooPermissionManager
getAdminGroups
in interface BambooPermissionManager
@NotNull public @NotNull Collection<String> getRestrictedAdminGroups()
BambooPermissionManager
getRestrictedAdminGroups
in interface BambooPermissionManager
@NotNull public @NotNull Collection<String> getUsePermissionGroups()
BambooPermissionManager
getUsePermissionGroups
in interface BambooPermissionManager
@NotNull public @NotNull String getDefaultUsersGroup()
getDefaultUsersGroup
in interface BambooPermissionManager
@NotNull public @NotNull Collection<String> getGroupsWithPermission(BambooPermission permission)
@NotNull public @NotNull Collection<String> getAdminUsers()
BambooPermissionManager
getAdminUsers
in interface BambooPermissionManager
@NotNull public @NotNull Collection<String> getRestrictedAdminUsers()
BambooPermissionManager
getRestrictedAdminUsers
in interface BambooPermissionManager
@NotNull public @NotNull Collection<String> getUsePermissionUsers()
BambooPermissionManager
getUsePermissionUsers
in interface BambooPermissionManager
@NotNull public @NotNull Collection<String> getUsersWithPermission(BambooPermission permission)
public boolean isAdmin(String username)
BambooPermissionManager
isAdmin
in interface BambooPermissionManager
username
- the userpublic boolean isSystemAdmin(String username)
BambooPermissionManager
isSystemAdmin
in interface BambooPermissionManager
username
- the userpublic boolean isAllowedToSetGlobalPermission(@NotNull @NotNull org.acegisecurity.acls.Permission permission)
BambooPermissionManager
isAllowedToSetGlobalPermission
in interface BambooPermissionManager
permission
- permission to checkpublic boolean canManageElasticBamboo()
BambooPermissionManager
canManageElasticBamboo
in interface BambooPermissionManager
public boolean canManageAgents()
BambooPermissionManager
canManageAgents
in interface BambooPermissionManager
public boolean canRunCustomBuild(@NotNull @NotNull PlanKey planKey)
canRunCustomBuild
in interface BambooPermissionManager
planKey
- key of the plan in questionprotected boolean hasPermission(@NotNull @NotNull org.acegisecurity.acls.Permission permission, @NotNull @NotNull HibernateObjectIdentityImpl objectIdentity, @NotNull @NotNull org.acegisecurity.Authentication authentication)
protected boolean hasPermission(@NotNull @NotNull org.acegisecurity.acls.Permission permission, @NotNull @NotNull org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity, @NotNull @NotNull org.acegisecurity.Authentication authentication)
protected org.acegisecurity.acls.objectidentity.ObjectIdentity createObjectIdentity(@NotNull @NotNull Object object)
public void setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor)
public void setAclService(org.acegisecurity.acls.MutableAclService aclService)
public void setSidRetrievalStrategy(org.acegisecurity.acls.sid.SidRetrievalStrategy sidRetrievalStrategy)
public void setCachedPlanManager(CachedPlanManager cachedPlanManager)
public void setProjectManager(ProjectManager projectManager)
public void setOverrideAuthorities(org.acegisecurity.GrantedAuthority[] overrideAuthorities)
public void setObjectIdentityRetrievalStrategy(org.acegisecurity.acls.objectidentity.ObjectIdentityRetrievalStrategy objectIdentityRetrievalStrategy)
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.