Examples of clearResourceAuthorizations()


Examples of org.wso2.carbon.user.core.AuthorizationManager.clearResourceAuthorizations()

          requestContext.getRegistry().move(resourcePath, newresourcePath);
                if (!newRoles.equals("#") &&
                        requestContext.getRegistry().getRegistryContext() != null) {
                    try {
                        AuthorizationManager authManager = CurrentSession.getUserRealm().getAuthorizationManager();
                        authManager.clearResourceAuthorizations(newresourcePath);
                        String[] roles = newRoles.split(",");
                        for (String role: roles) {
                            String roleName = role.trim();
                            authManager.authorizeRole(roleName, newresourcePath,
                                    ActionConstants.GET);
View Full Code Here

Examples of org.wso2.carbon.user.core.AuthorizationManager.clearResourceAuthorizations()

                RealmConfiguration realmConfig;
                realmConfig = registryContext.getRealmService().getBootstrapRealmConfiguration();
                String systemUserName = CarbonConstants.REGISTRY_SYSTEM_USERNAME;


                ac.clearResourceAuthorizations("/system");

                ac.authorizeUser(systemUserName, "/system", ActionConstants.GET);
                ac.authorizeUser(systemUserName, "/system", ActionConstants.PUT);
                ac.authorizeUser(systemUserName, "/system", ActionConstants.DELETE);
                ac.authorizeUser(systemUserName, "/system", AccessControlConstants.AUTHORIZE);
View Full Code Here

Examples of org.wso2.carbon.user.core.AuthorizationManager.clearResourceAuthorizations()

        assertFalse(authMan.isUserAuthorized("saman", "wall", "read"));
        assertFalse(authMan.isUserAuthorized("sunil", "wall", "write"));

        authMan.clearUserAuthorization("sunil", "wall", "read");
        authMan.clearRoleAuthorization("roley", "table", "write");
        authMan.clearResourceAuthorizations("wall");

        assertFalse(authMan.isUserAuthorized("saman", "wall", "write"));
        assertFalse(authMan.isUserAuthorized("sunil", "wall", "read"));
        assertFalse(authMan.isRoleAuthorized("roley", "table", "write"));
    }
View Full Code Here

Examples of org.wso2.carbon.user.core.AuthorizationManager.clearResourceAuthorizations()

        assertEquals(1, authMan.getDeniedRolesForResource("wall", "write").length);
        assertEquals(1, authMan.getExplicitlyDeniedUsersForResource("wall", "read").length);

        authMan.clearUserAuthorization("sunil", "wall", "read");
        authMan.clearRoleAuthorization("roley", "table", "write");
        authMan.clearResourceAuthorizations("wall");

        assertFalse(authMan.isUserAuthorized("saman", "wall", "write"));
        assertFalse(authMan.isUserAuthorized("sunil", "wall", "read"));
        assertFalse(authMan.isRoleAuthorized("roley", "table", "write"));
    }
View Full Code Here

Examples of org.wso2.carbon.user.core.AuthorizationManager.clearResourceAuthorizations()

            fail("Exception at clear role authorization");
        }catch(Exception e){

        }
       
        authMan.clearResourceAuthorizations("wall");
        try{
            authMan.clearResourceAuthorizations(null);
            fail("Exception at clear Resource Authorizations");
        }catch(Exception e){
View Full Code Here

Examples of org.wso2.carbon.user.core.AuthorizationManager.clearResourceAuthorizations()

        }
       
        authMan.clearResourceAuthorizations("wall");
        try{
            authMan.clearResourceAuthorizations(null);
            fail("Exception at clear Resource Authorizations");
        }catch(Exception e){

        }
View Full Code Here

Examples of org.wso2.carbon.user.core.AuthorizationManager.clearResourceAuthorizations()

        }catch(Exception e){
           //caught exception
        }
        //authMan.isRoleAuthorized("roley", "table", "write");
       
        authMan.clearResourceAuthorizations("wall");
        try{
            authMan.clearResourceAuthorizations(null);
            fail("Exception at clear Resource Authorizations");
        }catch(Exception e){
View Full Code Here

Examples of org.wso2.carbon.user.core.AuthorizationManager.clearResourceAuthorizations()

        }
        //authMan.isRoleAuthorized("roley", "table", "write");
       
        authMan.clearResourceAuthorizations("wall");
        try{
            authMan.clearResourceAuthorizations(null);
            fail("Exception at clear Resource Authorizations");
        }catch(Exception e){

        }
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.