Examples of updateUserListOfRole()


Examples of org.wso2.carbon.user.core.UserStoreManager.updateUserListOfRole()

                } else if (oldindex < 0 && isSelected) {
                    // added
                    addUsers.add(userName);
                }
            }
            admin.updateUserListOfRole(roleName, delUsers.toArray(new String[delUsers.size()]),
                    addUsers.toArray(new String[addUsers.size()]));
        } catch (UserStoreException e) {
            // previously logged so logging not needed
            log.error(e.getMessage(), e);
            throw new UserAdminException(e.getMessage(), e);
View Full Code Here

Examples of org.wso2.carbon.user.core.UserStoreManager.updateUserListOfRole()

        String[] rolesOfSaman = admin.getRoleListOfUser("saman");
        assertEquals(3, rolesOfSaman.length);

        // negative
        admin.updateUserListOfRole("role2", new String[] { "saman" }, null);
        admin.updateUserListOfRole("role3", null, new String[] { "amara", "sunil" });

        // negative
        try {
            //wrong roles
View Full Code Here

Examples of org.wso2.carbon.user.core.UserStoreManager.updateUserListOfRole()

        String[] rolesOfSaman = admin.getRoleListOfUser("saman");
        assertEquals(3, rolesOfSaman.length);

        // negative
        admin.updateUserListOfRole("role2", new String[] { "saman" }, null);
        admin.updateUserListOfRole("role3", null, new String[] { "amara", "sunil" });

        // negative
        try {
            //wrong roles
            admin.updateRoleListOfUser("saman", new String[] { "x" }, new String[] { "y" });
View Full Code Here

Examples of org.wso2.carbon.user.core.UserStoreManager.updateUserListOfRole()

        } catch (Exception e) {
            // exptected error in negative testing

        }
        //wrong users - must pass because we don't know the external users.
        admin.updateUserListOfRole("role2", null, new String[] { "d" });
    }

    public void doAuthorizationStuff() throws Exception {
        AuthorizationManager authMan = realm.getAuthorizationManager();
        UserStoreManager usWriter = realm.getUserStoreManager();
View Full Code Here

Examples of org.wso2.carbon.user.core.UserStoreManager.updateUserListOfRole()

        String[] rolesOfSaman = admin.getRoleListOfUser("saman");
        assertEquals(3, rolesOfSaman.length);

        // negative
        admin.updateUserListOfRole("role2", new String[] { "saman" }, null);
        admin.updateUserListOfRole("role3", null, new String[] { "amara", "sunil" });

        String[] users = admin.getUserListOfRole("role3");
        assertEquals(3, users.length);
View Full Code Here

Examples of org.wso2.carbon.user.core.UserStoreManager.updateUserListOfRole()

        String[] rolesOfSaman = admin.getRoleListOfUser("saman");
        assertEquals(3, rolesOfSaman.length);

        // negative
        admin.updateUserListOfRole("role2", new String[] { "saman" }, null);
        admin.updateUserListOfRole("role3", null, new String[] { "amara", "sunil" });

        String[] users = admin.getUserListOfRole("role3");
        assertEquals(3, users.length);

        // negative
View Full Code Here

Examples of org.wso2.carbon.user.core.UserStoreManager.updateUserListOfRole()

        } catch (Exception e) {
            // exptected error in negative testing

        }
        try {
            admin.updateUserListOfRole("role2", null, new String[] { "d" });
            TestCase.assertTrue(false);
        } catch (Exception e) {
            // exptected error in negative testing
        }
View Full Code Here

Examples of org.wso2.carbon.user.core.UserStoreManager.updateUserListOfRole()

           assertEquals(3, rolesOfSaman.length);
          
           String[] rolesOfisuru = admin.getRoleListOfUser("isuru");
           assertEquals(0, rolesOfisuru.length);
         
           admin.updateUserListOfRole("role2", new String[] { "saman" }, null);
           admin.updateUserListOfRole("role3", null, new String[] { "amara", "sunil" });

           String[] userOfRole5 = admin.getUserListOfRole("role5");
           assertEquals(1, userOfRole5.length);
View Full Code Here

Examples of org.wso2.carbon.user.core.UserStoreManager.updateUserListOfRole()

          
           String[] rolesOfisuru = admin.getRoleListOfUser("isuru");
           assertEquals(0, rolesOfisuru.length);
         
           admin.updateUserListOfRole("role2", new String[] { "saman" }, null);
           admin.updateUserListOfRole("role3", null, new String[] { "amara", "sunil" });

           String[] userOfRole5 = admin.getUserListOfRole("role5");
           assertEquals(1, userOfRole5.length);

           String[] userOfRole4 = admin.getUserListOfRole("role4");
View Full Code Here

Examples of org.wso2.carbon.user.core.UserStoreManager.updateUserListOfRole()

           String[] userOfRole4 = admin.getUserListOfRole("role4");
           assertEquals(0, userOfRole4.length);

           try {
            admin.updateUserListOfRole("rolexx", null, new String[] { "amara", "sunil" });
            TestCase.assertTrue(false);
           } catch (Exception e) {
            // exptected error in negative testing
           }
           try {
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.