com.atlassian.bamboo.security
Class BambooPermissionManagerImpl

java.lang.Object
  extended by com.atlassian.bamboo.security.BambooPermissionManagerImpl
All Implemented Interfaces:
BambooPermissionManager

public class BambooPermissionManagerImpl
extends Object
implements BambooPermissionManager


Field Summary
protected  org.acegisecurity.acls.MutableAclService aclService
           
 
Fields inherited from interface com.atlassian.bamboo.security.BambooPermissionManager
SYSTEM_AUTHORITY
 
Constructor Summary
BambooPermissionManagerImpl()
           
 
Method Summary
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 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)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

aclService

protected org.acegisecurity.acls.MutableAclService aclService
Constructor Detail

BambooPermissionManagerImpl

public BambooPermissionManagerImpl()
Method Detail

hasPermission

public boolean hasPermission(@NotNull
                             org.acegisecurity.acls.Permission permission,
                             @NotNull
                             Object object,
                             @Nullable
                             org.acegisecurity.Authentication authentication)
Description copied from interface: BambooPermissionManager
Checks whether a permission is granted to access object with given authentication.

Specified by:
hasPermission in interface BambooPermissionManager
Parameters:
permission - the permission to check for
object - the domain object on which the permission check will be made
authentication - the authentication/principal whose secury identities will be checked for the permission
Returns:

hasPermission

public com.google.common.base.Predicate<Object> hasPermission(@NotNull
                                                              BambooPermission permission,
                                                              @Nullable
                                                              org.acegisecurity.Authentication authentication)
Description copied from interface: BambooPermissionManager
Predicate for {link #hasPermission(permission, object, authentication)}

Specified by:
hasPermission in interface BambooPermissionManager
Parameters:
permission - the permission to check for
authentication - the authentication/principal whose secury identities will be checked for the permission
Returns:

getAcl

public org.acegisecurity.acls.Acl getAcl(@NotNull
                                         Object object)
Specified by:
getAcl in interface BambooPermissionManager

hasPermission

public boolean hasPermission(@NotNull
                             String username,
                             @NotNull
                             org.acegisecurity.acls.Permission permission,
                             @NotNull
                             Object object)
Specified by:
hasPermission in interface BambooPermissionManager

hasPlanPermission

public boolean hasPlanPermission(@NotNull
                                 org.acegisecurity.acls.Permission permission,
                                 @NotNull
                                 PlanKey planKey)
Description copied from interface: BambooPermissionManager
Verify plan access

Specified by:
hasPlanPermission in interface BambooPermissionManager
Parameters:
permission - permission to check
planKey - key of the plan
Returns:
true iff permission is granted

hasPlanPermission

public boolean hasPlanPermission(@NotNull
                                 org.acegisecurity.acls.Permission permission,
                                 @NotNull
                                 ImmutablePlan plan)
Description copied from interface: BambooPermissionManager
Verify plan access

Specified by:
hasPlanPermission in interface BambooPermissionManager
Parameters:
permission - permission to check
plan - plan
Returns:
true iff permission is granted

hasGlobalPermission

public boolean hasGlobalPermission(@NotNull
                                   org.acegisecurity.acls.Permission permission)
Specified by:
hasGlobalPermission in interface BambooPermissionManager

getPermissionsForPlan

public Collection<org.acegisecurity.acls.Permission> getPermissionsForPlan(@NotNull
                                                                           PlanKey planKey)
Specified by:
getPermissionsForPlan in interface BambooPermissionManager

hasProjectEditPermission

public boolean hasProjectEditPermission(Project project)
Specified by:
hasProjectEditPermission in interface BambooPermissionManager

isEnableSignup

public boolean isEnableSignup()
Specified by:
isEnableSignup in interface BambooPermissionManager

getAdminGroups

@NotNull
public Collection<String> getAdminGroups()
Description copied from interface: BambooPermissionManager
Get a list of all the groups that have global administration permission

Specified by:
getAdminGroups in interface BambooPermissionManager
Returns:
A list of all the groups that have global administration permission

getRestrictedAdminGroups

@NotNull
public Collection<String> getRestrictedAdminGroups()
Description copied from interface: BambooPermissionManager
Get a list of all the groups that have global restricted administration permission

Specified by:
getRestrictedAdminGroups in interface BambooPermissionManager
Returns:
A list of all the groups that have global restricted administration permission

getUsePermissionGroups

@NotNull
public Collection<String> getUsePermissionGroups()
Description copied from interface: BambooPermissionManager
Get a list of all the groups that have global read or create plan permission

Specified by:
getUsePermissionGroups in interface BambooPermissionManager
Returns:
A list of all the groups that have global read or create plan permission

getDefaultUsersGroup

@NotNull
public String getDefaultUsersGroup()
Specified by:
getDefaultUsersGroup in interface BambooPermissionManager
Returns:
the name of the default group that users will be added to when they are created

getGroupsWithPermission

@NotNull
public Collection<String> getGroupsWithPermission(BambooPermission permission)

getAdminUsers

@NotNull
public Collection<String> getAdminUsers()
Description copied from interface: BambooPermissionManager
Get a list of all the users that have global administration permission

Specified by:
getAdminUsers in interface BambooPermissionManager
Returns:
A list of all the users that have global administration permission

getRestrictedAdminUsers

@NotNull
public Collection<String> getRestrictedAdminUsers()
Description copied from interface: BambooPermissionManager
Get a list of all the users that have global restricted administration permission

Specified by:
getRestrictedAdminUsers in interface BambooPermissionManager
Returns:
A list of all the users that have global restricted administration permission

getUsePermissionUsers

@NotNull
public Collection<String> getUsePermissionUsers()
Description copied from interface: BambooPermissionManager
Get a list of all the users that have global read or create plan permission

Specified by:
getUsePermissionUsers in interface BambooPermissionManager
Returns:
A list of all the users that have global read or create plan permission

getUsersWithPermission

@NotNull
public Collection<String> getUsersWithPermission(BambooPermission permission)

isAdmin

public boolean isAdmin(String username)
Description copied from interface: BambooPermissionManager
Returns true if the user is an admin, false if not

Specified by:
isAdmin in interface BambooPermissionManager
Parameters:
username - the user
Returns:
true if the user is an admin, false if not

isSystemAdmin

public boolean isSystemAdmin(String username)
Description copied from interface: BambooPermissionManager
Returns true if the user is a sysadmin, false if not

Specified by:
isSystemAdmin in interface BambooPermissionManager
Parameters:
username - the user
Returns:
true if the user is a sysadmin, false if not

isAllowedToSetGlobalPermission

public boolean isAllowedToSetGlobalPermission(@NotNull
                                              org.acegisecurity.acls.Permission permission)
Description copied from interface: BambooPermissionManager
Returns true if user is allowed to set specific global permission

Specified by:
isAllowedToSetGlobalPermission in interface BambooPermissionManager
Parameters:
permission - permission to check
Returns:

hasPermission

protected boolean hasPermission(@NotNull
                                org.acegisecurity.acls.Permission permission,
                                @NotNull
                                HibernateObjectIdentityImpl objectIdentity,
                                @NotNull
                                org.acegisecurity.Authentication authentication)

hasPermission

protected boolean hasPermission(@NotNull
                                org.acegisecurity.acls.Permission permission,
                                @NotNull
                                org.acegisecurity.acls.objectidentity.ObjectIdentity objectIdentity,
                                @NotNull
                                org.acegisecurity.Authentication authentication)

createObjectIdentity

protected org.acegisecurity.acls.objectidentity.ObjectIdentity createObjectIdentity(@NotNull
                                                                                    Object object)

setAdministrationConfigurationAccessor

public void setAdministrationConfigurationAccessor(AdministrationConfigurationAccessor administrationConfigurationAccessor)

setAclService

public void setAclService(org.acegisecurity.acls.MutableAclService aclService)

setSidRetrievalStrategy

public void setSidRetrievalStrategy(org.acegisecurity.acls.sid.SidRetrievalStrategy sidRetrievalStrategy)

setCachedPlanManager

public void setCachedPlanManager(CachedPlanManager cachedPlanManager)

setOverrideAuthorities

public void setOverrideAuthorities(org.acegisecurity.GrantedAuthority[] overrideAuthorities)

setBambooUserManager

public void setBambooUserManager(BambooUserManager bambooUserManager)

setObjectIdentityRetrievalStrategy

public void setObjectIdentityRetrievalStrategy(org.acegisecurity.acls.objectidentity.ObjectIdentityRetrievalStrategy objectIdentityRetrievalStrategy)


Copyright © 2015 Atlassian Software Systems Pty Ltd. All rights reserved.