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)
  • Constructor Details

    • MCRUserInformationLookup

      public MCRUserInformationLookup()
  • Method Details

    • lookup

      public String lookup(String key)
      Specified by:
      lookup in interface org.apache.logging.log4j.core.lookup.StrLookup
    • lookup

      public String lookup(org.apache.logging.log4j.core.LogEvent event, String key)
      Specified by:
      lookup in interface org.apache.logging.log4j.core.lookup.StrLookup