Class CASecurity
java.lang.Object
com.io7m.cardant.security.CASecurity
The main API for performing security policy checks.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidcheck(UUID userId, com.io7m.medrina.api.MSubject subject, com.io7m.medrina.api.MObject object, com.io7m.medrina.api.MActionName actionName) Check that a user is allowed to perform an action by the current policy.static voidsetPolicy(com.io7m.medrina.api.MPolicy policy) Set the currently loaded policy.
-
Method Details
-
setPolicy
public static void setPolicy(com.io7m.medrina.api.MPolicy policy) Set the currently loaded policy.- Parameters:
policy- The policy
-
check
public static void check(UUID userId, com.io7m.medrina.api.MSubject subject, com.io7m.medrina.api.MObject object, com.io7m.medrina.api.MActionName actionName) throws CASecurityException Check that a user is allowed to perform an action by the current policy.- Parameters:
userId- The user IDsubject- The userobject- The object upon which the action is being performedactionName- The action- Throws:
CASecurityException- If the operation is denied
-