net.sf.farrago.db
Class FarragoDbSessionPrivilegeChecker
java.lang.Object
net.sf.farrago.db.FarragoDbSessionPrivilegeChecker
- All Implemented Interfaces:
- FarragoSessionPrivilegeChecker
public class FarragoDbSessionPrivilegeChecker
- extends Object
- implements FarragoSessionPrivilegeChecker
Implements the FarragoSessionPrivilegeChecker
interface in the
context of a FarragoDbSession
.
An instance of this class must be created per statement i.e. it can't be
shared between statements.
- Version:
- $Id: //open/dev/farrago/src/net/sf/farrago/db/FarragoDbSessionPrivilegeChecker.java#14 $
- Author:
- Tai Tran
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
session
private final FarragoSession session
authMap
private final Map<List<FemAuthId>,Set<FemAuthId>> authMap
publicRole
private FemRole publicRole
FarragoDbSessionPrivilegeChecker
public FarragoDbSessionPrivilegeChecker(FarragoSession session)
requestAccess
public void requestAccess(CwmModelElement obj,
FemUser user,
FemRole role,
String action)
- Description copied from interface:
FarragoSessionPrivilegeChecker
- Submits a request for access to a catalog object. Actual checking of the
request may be deferred until the next call to checkAccess. It is legal
to specify neither, one, or both of user and role; even when both are
null, privileges granted to PUBLIC still apply.
- Specified by:
requestAccess
in interface FarragoSessionPrivilegeChecker
- Parameters:
obj
- object to be accesseduser
- the requesting user, or null for nonerole
- the requesting role, or null for noneaction
- the action to be performed on obj (see PrivilegedActionEnum
for base set)
getPublicRole
private FemRole getPublicRole()
checkAccess
public void checkAccess()
- Description copied from interface:
FarragoSessionPrivilegeChecker
- Checks access for all requests that have been submitted, and clears the
request list.
- Specified by:
checkAccess
in interface FarragoSessionPrivilegeChecker
inheritRoles
private void inheritRoles(FemRole role,
Set<FemAuthId> inheritedRoles)
testAccess
private boolean testAccess(CwmModelElement obj,
Set<FemAuthId> authSet,
String action)