Package com.io7m.cardant.security

# Class CASecurity

java.lang.Object
com.io7m.cardant.security.CASecurity

public final class CASecurity extends Object
The main API for performing security policy checks.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `check(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 void`
  `setPolicy(com.io7m.medrina.api.MPolicy policy)`
  Set the currently loaded policy.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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 ID
      `subject` - The user
      `object` - The object upon which the action is being performed
      `actionName` - The action
    Throws:
      `CASecurityException` - If the operation is denied