Package io.milton.http
Class AclUtils
java.lang.Object
io.milton.http.AclUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasSet(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 impliedReturn a set containing all privs in the given collection, and also all priviledges implies by those, and so on recursively
-
Constructor Details
-
AclUtils
public AclUtils()
-
-
Method Details
-
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
-