Class BambooAcegiSecurityUtils
- java.lang.Object
-
- com.atlassian.bamboo.security.acegi.BambooAcegiSecurityUtils
-
public class BambooAcegiSecurityUtils extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
hasAuthority(@NotNull org.acegisecurity.Authentication authentication, @NotNull org.acegisecurity.GrantedAuthority checkedAuthority)
static boolean
hasAuthority(org.acegisecurity.GrantedAuthority[] authorities, @NotNull org.acegisecurity.GrantedAuthority checkedAuthority)
static boolean
hasAuthority(org.acegisecurity.userdetails.UserDetails userDetails, @NotNull org.acegisecurity.GrantedAuthority checkedAuthority)
static boolean
isGranted(@NotNull org.acegisecurity.acls.Acl acl, @NotNull BambooPermission permission, @NotNull org.acegisecurity.acls.sid.Sid sid)
Check if permission is explicitly granted to the given sid on an ACL object.static Comparator<org.acegisecurity.acls.sid.Sid>
sidComparator()
A comparator which can be used to construct tree-based collections for ACEGISid
s, for example aTreeSet
.
-
-
-
Method Detail
-
hasAuthority
public static boolean hasAuthority(@NotNull @NotNull org.acegisecurity.Authentication authentication, @NotNull @NotNull org.acegisecurity.GrantedAuthority checkedAuthority)
-
hasAuthority
public static boolean hasAuthority(org.acegisecurity.userdetails.UserDetails userDetails, @NotNull @NotNull org.acegisecurity.GrantedAuthority checkedAuthority)
-
hasAuthority
public static boolean hasAuthority(org.acegisecurity.GrantedAuthority[] authorities, @NotNull @NotNull org.acegisecurity.GrantedAuthority checkedAuthority)
-
isGranted
public static boolean isGranted(@NotNull @NotNull org.acegisecurity.acls.Acl acl, @NotNull @NotNull BambooPermission permission, @NotNull @NotNull org.acegisecurity.acls.sid.Sid sid)
Check if permission is explicitly granted to the given sid on an ACL object.
This method will not throw
NotFoundException
- instead, if the permission is missing, false will be returned.- Parameters:
acl
- acl objectpermission
- permission to checksid
- sid to check- Returns:
- true if permission is explicitly granted to sid, false otherwise
-
sidComparator
public static Comparator<org.acegisecurity.acls.sid.Sid> sidComparator()
-
-