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 |
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) |
protected org.acegisecurity.acls.objectidentity.ObjectIdentity |
createObjectIdentity(Object object) |
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<String> |
getGroupsWithPermission(BambooPermission permission) |
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
|
Collection<String> |
getUsersWithPermission(BambooPermission 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)}
|
protected boolean |
hasPermission(org.acegisecurity.acls.Permission permission,
HibernateObjectIdentityImpl objectIdentity,
org.acegisecurity.Authentication 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.
|
protected boolean |
hasPermission(org.acegisecurity.acls.Permission permission,
org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity,
org.acegisecurity.Authentication 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) |
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
|
void |
setAclService(org.acegisecurity.acls.MutableAclService aclService) |
void |
setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor) |
void |
setBambooUserManager(BambooUserManager bambooUserManager) |
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
org.acegisecurity.acls.Permission permission,
@NotNull
Object object,
@Nullable
org.acegisecurity.Authentication authentication)
BambooPermissionManagerhasPermission in interface BambooPermissionManagerpermission - 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 permissionpublic com.google.common.base.Predicate<Object> hasPermission(@NotNull BambooPermission permission, @Nullable org.acegisecurity.Authentication authentication)
BambooPermissionManagerhasPermission in interface BambooPermissionManagerpermission - the permission to check forauthentication - the authentication/principal whose secure identities will be checked for the permissionpublic boolean hasPermissionForAuthority(@NotNull
org.acegisecurity.acls.Permission permission,
@NotNull
Object object,
@NotNull
org.acegisecurity.GrantedAuthority authority)
BambooPermissionManagerhasPermissionForAuthority in interface BambooPermissionManagerpermission - 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
Object object)
getAcl in interface BambooPermissionManagerpublic boolean hasPermission(@NotNull
String username,
@NotNull
org.acegisecurity.acls.Permission permission,
@NotNull
Object object)
hasPermission in interface BambooPermissionManagerpublic boolean hasPlanPermission(@NotNull
org.acegisecurity.acls.Permission permission,
@NotNull
PlanKey planKey)
BambooPermissionManagerhasPlanPermission in interface BambooPermissionManagerpermission - permission to checkplanKey - key of the planpublic boolean hasPlanPermission(@NotNull
org.acegisecurity.acls.Permission permission,
@NotNull
ImmutablePlan plan)
BambooPermissionManagerhasPlanPermission in interface BambooPermissionManagerpermission - permission to checkplan - planpublic boolean hasProjectPermission(@NotNull
org.acegisecurity.acls.Permission permission,
@NotNull
String projectKey)
BambooPermissionManagerpermission for a project identified by projectKey.hasProjectPermission in interface BambooPermissionManagerpermission - permission to checkprojectKey - key of the project to checkpublic boolean hasProjectPermission(@NotNull
org.acegisecurity.acls.Permission permission,
@NotNull
Project project)
BambooPermissionManagerpermission for a project.hasProjectPermission in interface BambooPermissionManagerpermission - permission to checkproject - project to checkpublic boolean canCreatePlanInProject(@NotNull
String projectKey)
BambooPermissionManagerprojectKey.canCreatePlanInProject in interface BambooPermissionManagerprojectKey - key of the project to checkpublic boolean canCreatePlanInProject(@NotNull
Project project)
BambooPermissionManagerproject.canCreatePlanInProject in interface BambooPermissionManagerproject - project to checkpublic boolean canCreateProject()
BambooPermissionManagercanCreateProject in interface BambooPermissionManagerpublic boolean canCreatePlan()
BambooPermissionManagerThis method might be expensive to compute as it may need to check permissions on all projects for this Bamboo instance.
canCreatePlan in interface BambooPermissionManagerpublic boolean hasGlobalPermission(@NotNull
org.acegisecurity.acls.Permission permission)
hasGlobalPermission in interface BambooPermissionManagerpublic Collection<org.acegisecurity.acls.Permission> getPermissionsForPlan(@NotNull PlanKey planKey)
getPermissionsForPlan in interface BambooPermissionManagerpublic boolean hasProjectEditPermission(@Nullable
Project project)
hasProjectEditPermission in interface BambooPermissionManagerpublic boolean isEnableSignup()
isEnableSignup in interface BambooPermissionManager@NotNull public Collection<String> getAdminGroups()
BambooPermissionManagergetAdminGroups in interface BambooPermissionManager@NotNull public Collection<String> getRestrictedAdminGroups()
BambooPermissionManagergetRestrictedAdminGroups in interface BambooPermissionManager@NotNull public Collection<String> getUsePermissionGroups()
BambooPermissionManagergetUsePermissionGroups in interface BambooPermissionManager@NotNull public String getDefaultUsersGroup()
getDefaultUsersGroup in interface BambooPermissionManager@NotNull public Collection<String> getGroupsWithPermission(BambooPermission permission)
@NotNull public Collection<String> getAdminUsers()
BambooPermissionManagergetAdminUsers in interface BambooPermissionManager@NotNull public Collection<String> getRestrictedAdminUsers()
BambooPermissionManagergetRestrictedAdminUsers in interface BambooPermissionManager@NotNull public Collection<String> getUsePermissionUsers()
BambooPermissionManagergetUsePermissionUsers in interface BambooPermissionManager@NotNull public Collection<String> getUsersWithPermission(BambooPermission permission)
public boolean isAdmin(String username)
BambooPermissionManagerisAdmin in interface BambooPermissionManagerusername - the userpublic boolean isSystemAdmin(String username)
BambooPermissionManagerisSystemAdmin in interface BambooPermissionManagerusername - the userpublic boolean isAllowedToSetGlobalPermission(@NotNull
org.acegisecurity.acls.Permission permission)
BambooPermissionManagerisAllowedToSetGlobalPermission in interface BambooPermissionManagerpermission - permission to checkpublic boolean canManageElasticBamboo()
BambooPermissionManagercanManageElasticBamboo in interface BambooPermissionManagerpublic boolean canManageAgents()
BambooPermissionManagercanManageAgents in interface BambooPermissionManagerpublic boolean canRunCustomBuild(@NotNull
PlanKey planKey)
canRunCustomBuild in interface BambooPermissionManagerplanKey - key of the plan in questionprotected boolean hasPermission(@NotNull
org.acegisecurity.acls.Permission permission,
@NotNull
HibernateObjectIdentityImpl objectIdentity,
@NotNull
org.acegisecurity.Authentication authentication)
protected boolean hasPermission(@NotNull
org.acegisecurity.acls.Permission permission,
@NotNull
org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity,
@NotNull
org.acegisecurity.Authentication authentication)
protected org.acegisecurity.acls.objectidentity.ObjectIdentity createObjectIdentity(@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 setBambooUserManager(BambooUserManager bambooUserManager)
public void setObjectIdentityRetrievalStrategy(org.acegisecurity.acls.objectidentity.ObjectIdentityRetrievalStrategy objectIdentityRetrievalStrategy)
Copyright © 2017 Atlassian Software Systems Pty Ltd. All rights reserved.