Examples of clearUserAuthorization()


Examples of org.wso2.carbon.user.api.AuthorizationManager.clearUserAuthorization()

            String messageBoxPath = MessageBoxConstants.MB_MESSAGE_BOX_STORAGE_PATH + "/" +
                                    messageBoxId;

            for (String sharedUser : permissionLabel.getSharedUsers()) {
                for (String operation : permissionLabel.getOperations()) {
                    authorizationManager.clearUserAuthorization(sharedUser, messageBoxPath, operation);
                }
            }
        } catch (UserStoreException e) {
            String error = "Failed to clear permissions authorized for " + messageBoxId +
                           " with permission label " + permissionLabel.getLabelName();
View Full Code Here

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

            String resourceName = getSecureTopicPermissionPath(topicName);
           
            if (accessibleUsers != null) {
                for (String accessibleUser : accessibleUsers) {
                    if(!isSystemDefinedUser(accessibleUser)){
                        authorizationManager.clearUserAuthorization(accessibleUser,resourceName, AUTH_WRITE_ACTION);   
                    }
                }
            }

            if (acessibleRoles != null) {
View Full Code Here

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

        assertTrue(authMan.isUserAuthorized("sunil", "wall", "read"));
        assertTrue(authMan.isRoleAuthorized("roley", "table", "write"));
        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"));
View Full Code Here

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

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

        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"));
View Full Code Here

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

        assertEquals(1, AllowedRolesForResource.length);
        //assertEquals(2,authMan.getAllowedUsersForResource("wall", "write").length);
        //String[] AllowedUsersForResource = authMan.getAllowedUsersForResource("wall", "read");
        //assertEquals(1, AllowedUsersForResource.length);

        authMan.clearUserAuthorization("sunil", "wall", "read");
        try{
            authMan.clearUserAuthorization("isuru", "wall", "run");
            fail("Exception at clear user authorization");
        }catch(Exception e){
View Full Code Here

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

        //String[] AllowedUsersForResource = authMan.getAllowedUsersForResource("wall", "read");
        //assertEquals(1, AllowedUsersForResource.length);

        authMan.clearUserAuthorization("sunil", "wall", "read");
        try{
            authMan.clearUserAuthorization("isuru", "wall", "run");
            fail("Exception at clear user authorization");
        }catch(Exception e){

        }
        try{
View Full Code Here

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

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

        }
        try{
            authMan.clearUserAuthorization(null, "wall", "run");
            fail("Exception at clear user authorization");
        }catch(Exception e){

        }
        try{
View Full Code Here

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

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

        }
        try{
            authMan.clearUserAuthorization("isuru", null, "run");
            fail("Exception at clear user authorization");
        }catch(Exception e){

        }
        try{
View Full Code Here

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

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

        }
        try{
            authMan.clearUserAuthorization("isuru","wall", null);
            fail("Exception at clear user authorization");
        }catch(Exception e){

        }
View Full Code Here

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

          fail("Exception at check authorization of a user with Invalid action");
        } catch (Exception e) {
          //caught exception
        }

        authMan.clearUserAuthorization("sunil", "wall", "read");
        try{
            authMan.clearUserAuthorization("isuru", "wall", "run");
            fail("Exception at clear user authorization");
        }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.