org.globus.ogsa.impl.base.cas.server.databaseAccess.accessors
Class PermissionsEvaluator

java.lang.Object
  extended byorg.globus.ogsa.impl.base.cas.server.databaseAccess.accessors.PermissionsEvaluator

public class PermissionsEvaluator
extends java.lang.Object

Checks for presence of policy in CAS database based on super user, group presence of user, action or object. These are only internal permissions and not used while assessing external policies.


Constructor Summary
PermissionsEvaluator()
           
 
Method Summary
static boolean hasPermissions(PolicyData policyData, boolean ignoreSuperUser)
          Returns true if the userGroup can perform actionSpec on objectSpec Algorithm If ignoreSuperUser is false - Check if the given userGroup has cas/superuser on casServer.
static boolean userHasPermissions(java.lang.String userNick, PolicyData policyData)
          Method returns true if there is a policy in the CAS database that sematically is equivalent to the policy data.
static boolean userHasPermissions(java.lang.String userNick, PolicyData policyData, boolean ignoreSuperUser)
          Method returns true if there is a policy in the CAS databse that sematically is equivalent to the policy data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PermissionsEvaluator

public PermissionsEvaluator()
Method Detail

userHasPermissions

public static boolean userHasPermissions(java.lang.String userNick,
                                         PolicyData policyData)
                                  throws CasDBException
Method returns true if there is a policy in the CAS database that sematically is equivalent to the policy data. The super user check is done and if the user is a superuser then the policy is accepted

Throws:
CasDBException

userHasPermissions

public static boolean userHasPermissions(java.lang.String userNick,
                                         PolicyData policyData,
                                         boolean ignoreSuperUser)
                                  throws CasDBException
Method returns true if there is a policy in the CAS databse that sematically is equivalent to the policy data. The super user check is done only if the boolean parameter is false. If the user is a superuser then the policy is accepted

Throws:
CasDBException

hasPermissions

public static boolean hasPermissions(PolicyData policyData,
                                     boolean ignoreSuperUser)
                              throws CasDBException
Returns true if the userGroup can perform actionSpec on objectSpec Algorithm If ignoreSuperUser is false - Check if the given userGroup has cas/superuser on casServer. Return true if yes. Check if the community has permisions on objectSpec to do actionSpec Return true if yes Check if the actual userGroup itslef has permission on objectSpec for actionSpec

Throws:
CasDBException