com.atlassian.bamboo.security
Interface BambooPermissionManager

All Known Implementing Classes:
BambooPermissionManagerImpl

public interface BambooPermissionManager


Field Summary
static org.acegisecurity.adapters.PrincipalAcegiUserToken SYSTEM_AUTHORITY
           
 
Method Summary
 java.util.Collection<java.lang.String> getAdminGroups()
          Get a list of all the groups that have global administration permission
 java.util.Collection<org.acegisecurity.acls.Permission> getPermissionsForPlan(PlanKey planKey)
           
 java.util.Collection<org.acegisecurity.acls.Permission> getPermissionsForPlan(java.lang.String planKey)
          Deprecated. since 4.2 use getPermissionsForPlan(PlanKey)
 boolean hasGlobalPermission(org.acegisecurity.acls.Permission permission)
           
 boolean hasGlobalPermission(java.lang.String permission)
           
 boolean hasPermission(org.acegisecurity.Authentication authentication, java.lang.String permission, java.lang.Object object)
          Deprecated. 
 boolean hasPermission(org.acegisecurity.acls.Permission permission, java.lang.Object object, org.acegisecurity.Authentication authentication)
          Checks whether a permission is granted to access object with given authentication.
 boolean hasPermission(java.lang.String permission, java.lang.Object object)
          Deprecated. 
 boolean hasPermission(java.lang.String username, org.acegisecurity.acls.Permission permission, java.lang.Object object)
           
 boolean hasPermission(java.lang.String username, java.lang.String permission, java.lang.Object object)
          Deprecated. 
 boolean hasPlanPermission(org.acegisecurity.acls.Permission permission, PlanKey planKey)
           
 boolean hasPlanPermission(java.lang.String permission, java.lang.String planKey)
          Deprecated. since 4.2 use hasPlanPermission(Permission, PlanKey)
 boolean isAdmin(java.lang.String username)
          Returns true if the user is an admin, false if not
 boolean isEnableSignup()
           
 boolean isSystemAdmin(java.lang.String username)
          Returns true if the user is a sysadmin, false if not
 

Field Detail

SYSTEM_AUTHORITY

static final org.acegisecurity.adapters.PrincipalAcegiUserToken SYSTEM_AUTHORITY
Method Detail

hasPermission

boolean hasPermission(@NotNull
                      org.acegisecurity.acls.Permission permission,
                      @NotNull
                      java.lang.Object object,
                      @Nullable
                      org.acegisecurity.Authentication authentication)
Checks whether a permission is granted to access object with given authentication.

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

@Deprecated
boolean hasPermission(org.acegisecurity.Authentication authentication,
                                 java.lang.String permission,
                                 java.lang.Object object)
Deprecated. 

Since:
4.1 use $hasPermission(org.acegisecurity.acls.Permission, Object, org.acegisecurity.Authentication)

hasPermission

@Deprecated
boolean hasPermission(java.lang.String username,
                                 java.lang.String permission,
                                 java.lang.Object object)
Deprecated. 

Since:
4.1 use $hasPermission(String, Permission, Object)

hasPermission

boolean hasPermission(@NotNull
                      java.lang.String username,
                      @NotNull
                      org.acegisecurity.acls.Permission permission,
                      @NotNull
                      java.lang.Object object)

hasPermission

@Deprecated
boolean hasPermission(java.lang.String permission,
                                 java.lang.Object object)
Deprecated. 

Since:
4.1 use $hasPermission(org.acegisecurity.acls.Permission, Object, org.acegisecurity.Authentication)

hasPlanPermission

@Deprecated
boolean hasPlanPermission(java.lang.String permission,
                                     java.lang.String planKey)
Deprecated. since 4.2 use hasPlanPermission(Permission, PlanKey)


hasPlanPermission

boolean hasPlanPermission(@NotNull
                          org.acegisecurity.acls.Permission permission,
                          @NotNull
                          PlanKey planKey)

hasGlobalPermission

boolean hasGlobalPermission(java.lang.String permission)

hasGlobalPermission

boolean hasGlobalPermission(@NotNull
                            org.acegisecurity.acls.Permission permission)

isEnableSignup

boolean isEnableSignup()

getPermissionsForPlan

java.util.Collection<org.acegisecurity.acls.Permission> getPermissionsForPlan(@NotNull
                                                                              PlanKey planKey)

getPermissionsForPlan

@Deprecated
java.util.Collection<org.acegisecurity.acls.Permission> getPermissionsForPlan(java.lang.String planKey)
Deprecated. since 4.2 use getPermissionsForPlan(PlanKey)


getAdminGroups

java.util.Collection<java.lang.String> getAdminGroups()
Get a list of all the groups that have global administration permission

Returns:
A list of all the groups that have global administration permission

isAdmin

boolean isAdmin(java.lang.String username)
Returns true if the user is an admin, false if not

Parameters:
username - the user
Returns:
true if the user is an admin, false if not

isSystemAdmin

boolean isSystemAdmin(java.lang.String username)
Returns true if the user is a sysadmin, false if not

Parameters:
username - the user
Returns:
true if the user is a sysadmin, false if not


Copyright © 2012 Atlassian. All Rights Reserved.