Examples of autoSave()


Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

        try {
            UserManager uMgr = session.getUserManager();
            if (uMgr instanceof UserPerWorkspaceUserManager) {
                // make sure the user managers autosave flag can be changed to false.
                if (uMgr.isAutoSave()) {
                    uMgr.autoSave(false);
                    resetAutoSave = true;
                    log.debug("Changed autosave behavior of UserManager to 'false'.");
                }
                userManager = (UserPerWorkspaceUserManager) uMgr;
                initialized = true;
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

        super.setUp();

        if (superuser instanceof SessionImpl) {
            UserManager umgr = ((SessionImpl) superuser).getUserManager();
            if (!umgr.isAutoSave()) {
                umgr.autoSave(true);
            }
            String uid = "test";
            while (umgr.getAuthorizable(uid) != null) {
                uid += "_";
            }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

        super.setUp();

        if (superuser instanceof SessionImpl) {
            UserManager umgr = ((SessionImpl) superuser).getUserManager();
            if (!umgr.isAutoSave()) {
                umgr.autoSave(true);
            }
            String uid = "test";
            while (umgr.getAuthorizable(uid) != null) {
                uid += "_";
            }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

        sImpl = (SessionImpl) superuser;

        UserManager umgr = sImpl.getUserManager();
        if (umgr.isAutoSave()) {
            try {
                umgr.autoSave(false);
            } catch (RepositoryException e) {
                // user manager cannot have the autosave behavior changed
                // -> test not executable
                throw new NotExecutableException("Expected user manager that can have its autosave behavior changed to false.");
            }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

        super.setUp();

        if (superuser instanceof SessionImpl) {
            UserManager umgr = ((SessionImpl) superuser).getUserManager();
            if (!umgr.isAutoSave()) {
                umgr.autoSave(true);
            }
            String uid = "test";
            while (umgr.getAuthorizable(uid) != null) {
                uid += "_";
            }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

            SessionImpl.class, String.class}, superuser, "admin");
        assertNotNull(um);
        assertTrue(um instanceof UserManagerImpl);
        assertTrue(um.isAutoSave());
        try {
            um.autoSave(false);
            fail("must not be allowed");
        } catch (RepositoryException e) {
            // success
        }
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

        assertNotNull(um);
        assertTrue(um instanceof UserPerWorkspaceUserManager);
        // but: configured class creates a umgr that requires session.save
        assertTrue(um.isAutoSave());
        // changing autosave behavior must succeed.
        um.autoSave(false);

        // test authorizable-action configuration
        xml = parseXML(new InputSource(new StringReader(USER_MANAGER_CONFIG_WITH_ACTIONS)), true);
        umc = parser.parseSecurityConfig(xml).getSecurityManagerConfig().getUserManagerConfig();
        AuthorizableAction[] actions = umc.getAuthorizableActions();
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

    public void testTransientUserCannotLogin() throws RepositoryException, UnsupportedRepositoryOperationException {
        Session s = null;
        String uid = "testUser";
        UserManager umgr = ((JackrabbitSession) superuser).getUserManager();
        umgr.autoSave(false);
        try {
            // other users created in the default workspace...
            umgr.createUser(uid, uid);
            // the new user must be able to login to the repo
            s = getHelper().getRepository().login(new SimpleCredentials(uid, uid.toCharArray()));
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

            Authorizable a = ((JackrabbitSession) superuser).getUserManager().getAuthorizable(uid);
            if (a != null) {
                a.remove();
                superuser.save();
            }
            umgr.autoSave(true);
        }
    }
}
View Full Code Here

Examples of org.apache.jackrabbit.api.security.user.UserManager.autoSave()

    public void testTransientUserCannotLogin() throws RepositoryException, UnsupportedRepositoryOperationException {
        Session s = null;
        String uid = "testUser";
        UserManager umgr = ((JackrabbitSession) superuser).getUserManager();
        umgr.autoSave(false);
        try {
            // other users created in the default workspace...
            umgr.createUser(uid, uid);
            // the new user must be able to login to the repo
            s = getHelper().getRepository().login(new SimpleCredentials(uid, uid.toCharArray()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.