com.fuse.access_control
Class AccessControl

java.lang.Object
  extended by com.fuse.access_control.AccessControl

public class AccessControl
extends java.lang.Object

AccessControl-system enables trusted users to throw other users out of the system and do temporary bannings for them.


Field Summary
protected  java.io.File banningFile
           
protected  java.io.File groupsFile
           
protected  java.text.SimpleDateFormat sdf
           
 
Constructor Summary
AccessControl()
           
 
Method Summary
 boolean getIpBanned(java.lang.String ip)
          Returns true if the given IP-address is banned
 boolean getIsMemberOfGroup(FUSEUser user, java.lang.String groupName)
          Returns whether a user is a member of given group
 void setIpBanned(java.lang.String ip, java.util.Date d)
          Bans an IP-address until Date d
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

groupsFile

protected java.io.File groupsFile

banningFile

protected java.io.File banningFile

sdf

protected java.text.SimpleDateFormat sdf
Constructor Detail

AccessControl

public AccessControl()
Method Detail

getIpBanned

public boolean getIpBanned(java.lang.String ip)
Returns true if the given IP-address is banned


setIpBanned

public void setIpBanned(java.lang.String ip,
                        java.util.Date d)
Bans an IP-address until Date d


getIsMemberOfGroup

public boolean getIsMemberOfGroup(FUSEUser user,
                                  java.lang.String groupName)
Returns whether a user is a member of given group