Beispiel #1
0
  /**
   * @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);

    // 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);

    // 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);
  }
Beispiel #2
0
 @Override
 public void close() {
   super.close();
   entryCollector.close();
 }