|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mycore.access.MCRAccessManager
public class MCRAccessManager
| Field Summary | |
|---|---|
static Logger |
LOGGER
|
| Constructor Summary | |
|---|---|
MCRAccessManager()
|
|
| Method Summary | |
|---|---|
static void |
addRule(MCRObjectID id,
String permission,
Element rule,
String description)
adds an access rule for an MCRObjectID to an access system. |
static void |
addRule(String id,
String permission,
Element rule,
String description)
adds an access rule for an ID to an access system. |
static boolean |
checkPermission(MCRObjectID id,
String permission)
determines whether the current user has the permission to perform a certain action. |
static boolean |
checkPermission(String permission)
determines whether the current user has the permission to perform a certain action. |
static boolean |
checkPermission(String id,
String permission)
determines whether the current user has the permission to perform a certain action. |
static boolean |
checkPermissionForReadingDerivate(String derID)
checks whether the current user has the permission to read/see a derivate check is also against the mcrobject, the derivate belongs to both checks must return true it is needed in MCRFileNodeServlet and MCRZipServlet |
static MCRAccessInterface |
getAccessImpl()
|
static Element |
getFalseRule()
return a rule, that forbids something for all, but superuser |
static Collection<String> |
getPermissionsForID(MCRObjectID id)
lists all permissions defined for the id. |
static Collection<String> |
getPermissionsForID(String id)
lists all permissions defined for the id. |
static Element |
getTrueRule()
return a rule, that allows something for everybody |
static boolean |
hasRule(String id,
String permission)
return true if a rule for the id exist |
static void |
removeAllRules(MCRObjectID id)
removes all rules for the MCRObjectID. |
static void |
removeRule(MCRObjectID id,
String permission)
removes the permission rule for the MCRObjectID. |
static void |
removeRule(String id,
String permission)
removes the permission rule for the ID. |
static void |
updateRule(MCRObjectID id,
String permission,
Element rule,
String description)
updates an access rule for an MCRObjectID. |
static void |
updateRule(String id,
String permission,
Element rule,
String description)
updates an access rule for an ID. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final Logger LOGGER
| Constructor Detail |
|---|
public MCRAccessManager()
| Method Detail |
|---|
public static MCRAccessInterface getAccessImpl()
public static void addRule(MCRObjectID id,
String permission,
Element rule,
String description)
throws MCRException
id - the MCRObjectID of the objectpermission - the access permission for the rulerule - the access ruledescription - description for the given access rule, e.g. "allows public access"
MCRException - if an errow was occuredMCRAccessInterface.addRule(String, String, org.jdom.Element, String)
public static void addRule(String id,
String permission,
Element rule,
String description)
throws MCRException
id - the ID of the object as Stringpermission - the access permission for the rulerule - the access ruledescription - description for the given access rule, e.g. "allows public access"
MCRException - if an errow was occuredMCRAccessInterface.addRule(String, String, org.jdom.Element, String)
public static void removeRule(MCRObjectID id,
String permission)
throws MCRException
permission rule for the MCRObjectID.
id - the MCRObjectID of an objectpermission - the access permission for the rule
MCRException - if an errow was occuredMCRAccessInterface.removeRule(String, String)
public static void removeRule(String id,
String permission)
throws MCRException
permission rule for the ID.
id - the ID of an object as Stringpermission - the access permission for the rule
MCRException - if an errow was occuredMCRAccessInterface.removeRule(String, String)
public static void removeAllRules(MCRObjectID id)
throws MCRException
id - the MCRObjectID of an object
MCRException - if an errow was occuredMCRAccessInterface.removeRule(String)
public static void updateRule(MCRObjectID id,
String permission,
Element rule,
String description)
throws MCRException
id - the MCRObjectID of the objectpermission - the access permission for the rulerule - the access ruledescription - description for the given access rule, e.g. "allows public access"
MCRException - if an errow was occuredMCRAccessInterface.updateRule(String, String, Element, String)
public static void updateRule(String id,
String permission,
Element rule,
String description)
throws MCRException
id - the ID of the objectpermission - the access permission for the rulerule - the access ruledescription - description for the given access rule, e.g. "allows public access"
MCRException - if an errow was occuredMCRAccessInterface.updateRule(String, String, Element, String)
public static boolean checkPermission(MCRObjectID id,
String permission)
id - the MCRObjectID of the objectpermission - the access permission for the rule
MCRAccessInterface.checkPermission(String, String)
public static boolean checkPermission(String id,
String permission)
id - the MCRObjectID of the objectpermission - the access permission for the rule
public static boolean checkPermission(String permission)
permission - the access permission for the rule
public static boolean checkPermissionForReadingDerivate(String derID)
derID - String ID of a MyCoRe-Derivate
public static Collection<String> getPermissionsForID(String id)
id.
id - the ID of the object as String
List of all for id defined
permissionspublic static Collection<String> getPermissionsForID(MCRObjectID id)
id.
id - the MCRObjectID of the object
List of all for id defined
permissionspublic static Element getTrueRule()
public static Element getFalseRule()
public static boolean hasRule(String id,
String permission)
id - the MCRObjectID of the objectpermission - the access permission for the rule
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||