Package org.mycore.common.log4j2.lookups
Class MCRUserInformationLookup
java.lang.Object
org.mycore.common.log4j2.lookups.MCRUserInformationLookup
- All Implemented Interfaces:
org.apache.logging.log4j.core.lookup.StrLookup
@Plugin(name="mcruser",
category="Lookup")
public class MCRUserInformationLookup
extends Object
implements org.apache.logging.log4j.core.lookup.StrLookup
Allows to access information on the current user. This lookup returns
null
if key == null
or MCRSessionMgr.hasCurrentSession()
returns false
. key
may be either
- id
- returns the current user id
- role:{role1},{role2},...,{roleN}
- returns the first role the current user is in
- Author:
- Thomas Scheffler (yagee)
-
Field Summary
Fields inherited from interface org.apache.logging.log4j.core.lookup.StrLookup
CATEGORY
-
Constructor Summary
-
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.apache.logging.log4j.core.lookup.StrLookup
evaluate, evaluate
-
Constructor Details
-
MCRUserInformationLookup
public MCRUserInformationLookup()
-
-
Method Details
-
lookup
- Specified by:
lookup
in interfaceorg.apache.logging.log4j.core.lookup.StrLookup
-
lookup
- Specified by:
lookup
in interfaceorg.apache.logging.log4j.core.lookup.StrLookup
-