Examples of unassignPrivilegeToRole()


Examples of gwtappcontainer.server.apps.security.SecurityAPI.unassignPrivilegeToRole()

    //should have the right privilege to assign
    response = api.assignPrivilegeToRole("testrole",
        "testprivilege", helper.loginAsSuperUser());
    assertTrue(response.statusCode == Status.SUCCESS);
   
    response = api.unassignPrivilegeToRole("testrole",
        "testprivilege", helper.loginAsInvalidUser());
    assertTrue(response.statusCode == Status.ERROR_INVALID_USER);
   
    response = api.unassignPrivilegeToRole("testrole",
        "testprivilege", helper.loginAsValidUser());
View Full Code Here

Examples of gwtappcontainer.server.apps.security.SecurityAPI.unassignPrivilegeToRole()

   
    response = api.unassignPrivilegeToRole("testrole",
        "testprivilege", helper.loginAsInvalidUser());
    assertTrue(response.statusCode == Status.ERROR_INVALID_USER);
   
    response = api.unassignPrivilegeToRole("testrole",
        "testprivilege", helper.loginAsValidUser());
    assertTrue(response.statusCode == Status.ERROR_INSUFFICIENT_PERMISSION);
   
    response = api.unassignPrivilegeToRole("testrole",
        "testprivilege", helper.loginWithPrivilege(Privileges.EDIT_ROLE));   
View Full Code Here

Examples of gwtappcontainer.server.apps.security.SecurityAPI.unassignPrivilegeToRole()

   
    response = api.unassignPrivilegeToRole("testrole",
        "testprivilege", helper.loginAsValidUser());
    assertTrue(response.statusCode == Status.ERROR_INSUFFICIENT_PERMISSION);
   
    response = api.unassignPrivilegeToRole("testrole",
        "testprivilege", helper.loginWithPrivilege(Privileges.EDIT_ROLE));   
    assertTrue(response.statusCode == Status.SUCCESS);
   
    response = api.getAllRoles();
    TreeSet<RoleProp> allRoles = (TreeSet<RoleProp>) response.object;
View Full Code Here

Examples of gwtappcontainer.server.apps.security.SecurityAPI.unassignPrivilegeToRole()

    response = api.getAllRoles();
    TreeSet<RoleProp> allRoles = (TreeSet<RoleProp>) response.object;
    assertTrue(! allRoles.first().privileges.contains("TESTPRIVILEGE"))
   
    //admin can unassign as well
    response = api.unassignPrivilegeToRole("testrole",
        "testprivilege", helper.loginAsSuperUser());     
    assertTrue(response.statusCode == Status.SUCCESS);     
  }
 
  @Test
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.