org.starhope.appius.sys.admin
Class Security

java.lang.Object
  extended by org.starhope.appius.sys.admin.Security

public class Security
extends Object

WRITEME: Document this type.

Author:
brpocock@star-hope.org

Field Summary
(package private) static CapabilityRecords capabilities
          WRITEME
 
Constructor Summary
Security()
           
 
Method Summary
static void grantCapability(AbstractUser grantor, AbstractUser recipient, SecurityCapability cap)
           
static boolean hasCapability(AbstractUser who, Integer capabilityID)
          This is a convenience method, principally for using the constants in SecurityCapability like SecurityCapability.CAP_SYSOP_COMMANDS and the like.
static boolean hasCapability(AbstractUser who, SecurityCapability cap)
          Determine whether the user possesses a particular security capability.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

capabilities

static CapabilityRecords capabilities
WRITEME

Constructor Detail

Security

public Security()
Method Detail

grantCapability

public static void grantCapability(AbstractUser grantor,
                                   AbstractUser recipient,
                                   SecurityCapability cap)
                            throws PrivilegeRequiredException
Parameters:
grantor - WRITEME
recipient - WRITEME
cap - WRITEME
Throws:
PrivilegeRequiredException - WRITEME

hasCapability

public static boolean hasCapability(AbstractUser who,
                                    Integer capabilityID)
This is a convenience method, principally for using the constants in SecurityCapability like SecurityCapability.CAP_SYSOP_COMMANDS and the like.

Parameters:
who - the user being queried
capabilityID - The numeric ID of the security capability in question
Returns:
true, if the user has the capability

hasCapability

public static boolean hasCapability(AbstractUser who,
                                    SecurityCapability cap)
Determine whether the user possesses a particular security capability.

Parameters:
who - the user being queried
cap - The security capability in question
Returns:
true, only if the user has the given capability