/** * @see org.apache.jackrabbit.core.security.authorization.AccessControlProvider#init(Session, Map) */ @Override public void init(Session systemSession, Map configuration) throws RepositoryException { super.init(systemSession, configuration); allowUnknownPrincipals = "true".equals(configuration.get(PARAM_ALLOW_UNKNOWN_PRINCIPALS)); // make sure the workspace of the given systemSession has a // minimal protection on the root node. NodeImpl root = (NodeImpl) session.getRootNode(); rootNodeId = root.getNodeId(); ACLEditor systemEditor = new ACLEditor(session, this, allowUnknownPrincipals); // TODO: replace by configurable default policy (see JCR-2331) boolean initializedWithDefaults = !configuration.containsKey(PARAM_OMIT_DEFAULT_PERMISSIONS); if (initializedWithDefaults && !isAccessControlled(root)) { initRootACL(session, systemEditor); } entryCollector = createEntryCollector(session); }
/** * @see org.apache.jackrabbit.core.security.authorization.AccessControlProvider#init(Session, Map) */ @Override public void init(Session systemSession, Map configuration) throws RepositoryException { super.init(systemSession, configuration); allowUnknownPrincipals = "true".equals(configuration.get(PARAM_ALLOW_UNKNOWN_PRINCIPALS)); // make sure the workspace of the given systemSession has a // minimal protection on the root node. NodeImpl root = (NodeImpl) session.getRootNode(); rootNodeId = root.getNodeId(); ACLEditor systemEditor = new ACLEditor(session, this, allowUnknownPrincipals); // TODO: replace by configurable default policy (see JCR-2331) boolean initializedWithDefaults = !configuration.containsKey(PARAM_OMIT_DEFAULT_PERMISSIONS); if (initializedWithDefaults && !isAccessControlled(root)) { initRootACL(session, systemEditor); } entryCollector = createEntryCollector(session); }