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 |
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 |
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 |
setSidRetrievalStrategy(org.acegisecurity.acls.sid.SidRetrievalStrategy sidRetrievalStrategy) |
public boolean hasPermission(@NotNull org.acegisecurity.acls.Permission permission, @NotNull Object object, @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 permissionpublic com.google.common.base.Predicate<Object> hasPermission(@NotNull BambooPermission permission, @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 org.acegisecurity.acls.Permission permission, @NotNull Object object, @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 Object object)
getAcl
in interface BambooPermissionManager
public boolean hasPermission(@NotNull String username, @NotNull org.acegisecurity.acls.Permission permission, @NotNull Object object)
hasPermission
in interface BambooPermissionManager
public boolean hasPlanPermission(@NotNull org.acegisecurity.acls.Permission permission, @NotNull PlanKey planKey)
BambooPermissionManager
hasPlanPermission
in interface BambooPermissionManager
permission
- permission to checkplanKey
- key of the planpublic boolean hasPlanPermission(@NotNull org.acegisecurity.acls.Permission permission, @NotNull ImmutablePlan plan)
BambooPermissionManager
hasPlanPermission
in interface BambooPermissionManager
permission
- permission to checkplan
- planpublic boolean hasGlobalPermission(@NotNull org.acegisecurity.acls.Permission permission)
hasGlobalPermission
in interface BambooPermissionManager
public Collection<org.acegisecurity.acls.Permission> getPermissionsForPlan(@NotNull PlanKey planKey)
getPermissionsForPlan
in interface BambooPermissionManager
public boolean hasProjectEditPermission(Project project)
hasProjectEditPermission
in interface BambooPermissionManager
public boolean isEnableSignup()
isEnableSignup
in interface BambooPermissionManager
@NotNull public Collection<String> getAdminGroups()
BambooPermissionManager
getAdminGroups
in interface BambooPermissionManager
@NotNull public Collection<String> getRestrictedAdminGroups()
BambooPermissionManager
getRestrictedAdminGroups
in interface BambooPermissionManager
@NotNull public Collection<String> getUsePermissionGroups()
BambooPermissionManager
getUsePermissionGroups
in interface BambooPermissionManager
@NotNull public String getDefaultUsersGroup()
getDefaultUsersGroup
in interface BambooPermissionManager
@NotNull public Collection<String> getGroupsWithPermission(BambooPermission permission)
@NotNull public Collection<String> getAdminUsers()
BambooPermissionManager
getAdminUsers
in interface BambooPermissionManager
@NotNull public Collection<String> getRestrictedAdminUsers()
BambooPermissionManager
getRestrictedAdminUsers
in interface BambooPermissionManager
@NotNull public Collection<String> getUsePermissionUsers()
BambooPermissionManager
getUsePermissionUsers
in interface BambooPermissionManager
@NotNull public 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 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 PlanKey planKey)
canRunCustomBuild
in interface BambooPermissionManager
planKey
- 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 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.