/** * @see org.apache.jackrabbit.core.security.authorization.AccessControlProvider#getEditor(Session) */ public AccessControlEditor getEditor(Session session) { checkInitialized(); return new ACLEditor(session, this, allowUnknownPrincipals); }
/** * @see org.apache.jackrabbit.core.security.authorization.AccessControlProvider#getEditor(Session) */ public AccessControlEditor getEditor(Session session) { checkInitialized(); return new ACLEditor(session, this, allowUnknownPrincipals); }
/** * @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); }
/** * Overridden to: * <ul> * <li>Store {@code configuration} for later passing to {@link PentahoEntryCollector}.</li> * <li>Add JCR_READ_ACCESS_CONTROL to root ACL. This is harmless and avoids more customization.</li> * </ul> */ @Override @SuppressWarnings( "rawtypes" ) public void init( final Session systemSession, final Map conf ) throws RepositoryException { this.configuration = conf; ISystemConfig settings = PentahoSystem.get( ISystemConfig.class ); if ( settings != null ) { useCachingEntryCollector = "true".equals( settings.getProperty( "system.cachingEntryCollector" ) ); } super.init( systemSession, conf ); // original initRootACL should run during super.init call above updateRootAcl( (SessionImpl) systemSession, new ACLEditor( session, this, false /* allowUnknownPrincipals */ ) ); this.initialized = true; registerEntryCollectorWithObservationManager( systemSession ); }