Package io.milton.http
Class AclUtils
- java.lang.Object
-
- io.milton.http.AclUtils
-
public class AclUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description AclUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Set<AccessControlledResource.Priviledge>asSet(AccessControlledResource.Priviledge... privs)static booleancontainsPriviledge(AccessControlledResource.Priviledge required, Iterable<AccessControlledResource.Priviledge> privs)Recurisve function which checks the given collection of priviledges, and checks inside the contains property of those priviledges Returns true if the required priviledge is directly present in the collection or is impliedstatic Set<AccessControlledResource.Priviledge>expand(Iterable<AccessControlledResource.Priviledge> privs)Return a set containing all privs in the given collection, and also all priviledges implies by those, and so on recursively
-
-
-
Method Detail
-
containsPriviledge
public static boolean containsPriviledge(AccessControlledResource.Priviledge required, Iterable<AccessControlledResource.Priviledge> privs)
Recurisve function which checks the given collection of priviledges, and checks inside the contains property of those priviledges Returns true if the required priviledge is directly present in the collection or is implied- Parameters:
required-privs-- Returns:
-
asSet
public static Set<AccessControlledResource.Priviledge> asSet(AccessControlledResource.Priviledge... privs)
-
expand
public static Set<AccessControlledResource.Priviledge> expand(Iterable<AccessControlledResource.Priviledge> privs)
Return a set containing all privs in the given collection, and also all priviledges implies by those, and so on recursively- Parameters:
privs-- Returns:
- - a set containiing all priviledges, direct or implied, by the given collection
-
-