Examples of UserProp


Examples of gwtappcontainer.shared.apps.security.UserProp

   
    response = api.assignRoleToUser("test@test.com", "role1",
        helper.loginWithPrivilege(Privileges.EDIT_USER));
    assertTrue(response.statusCode == Status.SUCCESS);
   
    UserProp userProp = (UserProp) api.getUser("test@test.com").object;
    assertTrue(userProp.email.equals("test@test.com"));
    assertTrue(userProp.roles.first().role.equals("ROLE1"));
    assertTrue(userProp.roles.first().privileges.contains("PRIVILEGE1"));
  }
View Full Code Here

Examples of gwtappcontainer.shared.apps.security.UserProp

   
    response = api.unassignRoleToUser("test@test.com", "role2",
        helper.loginWithPrivilege(Privileges.EDIT_USER));   
    assertTrue(response.statusCode == Status.SUCCESS);
   
    UserProp userProp = (UserProp) api.getUser("test@test.com").object;
    assertTrue(userProp.roles.size() == 1);
    assertTrue(userProp.roles.first().role.equals("ROLE1"));
           
    //admin can also unassign
    response = api.unassignRoleToUser("test@test.com", "role1",
View Full Code Here

Examples of gwtappcontainer.shared.apps.security.UserProp

   
    response = api.assignPrivilegeToUser("test@test.com",
        "privilege1", helper.loginWithPrivilege(Privileges.EDIT_USER));
    assertTrue(response.statusCode == Status.SUCCESS);
   
    UserProp userProp = (UserProp) api.getUser("test@test.com").object;
    assertTrue(userProp.privileges.contains("PRIVILEGE1"));
           
    //no exception
   
    //admin can assign as well
View Full Code Here

Examples of gwtappcontainer.shared.apps.security.UserProp

    assertTrue(response.statusCode == Status.ERROR_INSUFFICIENT_PERMISSION);
   
    response = api.unassignPrivilegeToUser(email,
        "privilege1", helper.loginAsSuperUser());
    System.out.println("status 1: " + response.statusCode);
    UserProp userProp = (UserProp) api.getUser(email).object;
    assertTrue(! userProp.privileges.contains("PRIVILEGE1"));
    System.out.println("user prop: " + userProp);
    assertTrue(response.statusCode == Status.SUCCESS);           
   
    //admin can unassign as well
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.