WPI GDC CMS 0.0.1

org.wpi.gdc.cms.main
Class ACLUserEntry

java.lang.Object
  |
  +--org.wpi.gdc.cms.main.ACLEntry
        |
        +--org.wpi.gdc.cms.main.ACLUserEntry

public class ACLUserEntry
extends ACLEntry

An Access Control List entry. This class is abstract as there are two types of ACL Entries: group entries and user entries.

Version:
1.2
Author:
dmpotter

Field Summary
protected  User myUser
           
 
Fields inherited from class org.wpi.gdc.cms.main.ACLEntry
permissions
 
Constructor Summary
ACLUserEntry(User user)
           
 
Method Summary
 boolean checkUser(User user)
          Determines if the User object passed has permissions that come from this ACL.
 boolean hasPermission(int flags)
          Checks to see if all permissions passed (from the ACL class's permission constants) are present on this ACLEntry.
 
Methods inherited from class org.wpi.gdc.cms.main.ACLEntry
getPermissions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

myUser

protected User myUser
Constructor Detail

ACLUserEntry

public ACLUserEntry(User user)
Method Detail

checkUser

public boolean checkUser(User user)
Determines if the User object passed has permissions that come from this ACL. (In other words, if this is a User ACL entry, this is true if the User passed is the user being checked, if it is a Group ACL entry, it is true if the User being passed is in the group.)
Overrides:
checkUser in class ACLEntry
Parameters:
user - the user being checked as gaining permissions from this entry.
Returns:
true if the user does gain permissions from this entry, false otherwise.

hasPermission

public boolean hasPermission(int flags)
Checks to see if all permissions passed (from the ACL class's permission constants) are present on this ACLEntry.
Overrides:
hasPermission in class ACLEntry
Parameters:
flags - the permissions to check if are present.
Returns:
true if the permissions are allowed, false if they are not.

WPI GDC CMS 0.0.1

Copyright © 2001 WPI Game Development Club. All Rights Reserved.