Search in sources :

Example 1 with SimpleAccessManager

use of org.apache.jackrabbit.core.security.simple.SimpleAccessManager in project jackrabbit by apache.

the class SecurityConfigTest method testConfig1.

public void testConfig1() throws ConfigurationException {
    Element xml = parseXML(new InputSource(new StringReader(CONFIG_1)), true);
    SecurityConfig config = parser.parseSecurityConfig(xml);
    assertNotNull(config.getAppName());
    assertEquals("Jackrabbit", config.getAppName());
    SecurityManagerConfig smc = config.getSecurityManagerConfig();
    assertNotNull(smc);
    assertTrue(smc.newInstance(JackrabbitSecurityManager.class) instanceof SimpleSecurityManager);
    assertNull(smc.getWorkspaceAccessConfig());
    assertNull(smc.getWorkspaceName());
    assertNotNull(config.getAccessManagerConfig());
    assertTrue(config.getAccessManagerConfig().newInstance(AccessManager.class) instanceof SimpleAccessManager);
    assertNull(config.getLoginModuleConfig());
}
Also used : InputSource(org.xml.sax.InputSource) SimpleAccessManager(org.apache.jackrabbit.core.security.simple.SimpleAccessManager) Element(org.w3c.dom.Element) StringReader(java.io.StringReader) SimpleSecurityManager(org.apache.jackrabbit.core.security.simple.SimpleSecurityManager)

Aggregations

StringReader (java.io.StringReader)1 SimpleAccessManager (org.apache.jackrabbit.core.security.simple.SimpleAccessManager)1 SimpleSecurityManager (org.apache.jackrabbit.core.security.simple.SimpleSecurityManager)1 Element (org.w3c.dom.Element)1 InputSource (org.xml.sax.InputSource)1