Examples of UserProp


Examples of gwtappcontainer.shared.apis.admin.UserProp

    try {
      //only PORTAL_ADMIN can add user
      ensureRole(user, Role.PORTAL_ADMIN);     
                     
      UserRepository repository = new UserRepository();
      UserProp prop = repository.addUser(email);
     
      APIResponse resp = new APIResponse();
      resp.statusCode = Status.SUCCESS;
      resp.object = prop;
      return resp;
View Full Code Here

Examples of gwtappcontainer.shared.apis.admin.UserProp

    email = email.toLowerCase();
   
    RoleProp roleProp = new RoleProp();
    roleProp.name = role.toString()
   
    UserProp userProp;
    if (userProps.containsKey(email)) {
      userProp = userProps.get(email);           
    } else {
      userProp = new UserProp();
      userProp.roles = new ArrayList<RoleProp>();
      userProp.email = email;             
      userProps.put(email, userProp);
    }
   
View Full Code Here

Examples of gwtappcontainer.shared.apis.admin.UserProp

    userProp.roles.add(roleProp);
  }   
     
  @Override
  protected UserProp getUserProp(User user) {         
    UserProp prop = userProps.get(user.getEmail().toLowerCase());           
    return prop;
  }
View Full Code Here

Examples of gwtappcontainer.shared.apis.admin.UserProp

    AdminAPI api = new AdminAPI();
    APIResponse resp = api.getRolesForUser(user.getEmail());
   
    assertTrue(resp.statusCode == Status.SUCCESS);
   
    UserProp prop = (UserProp) resp.object;
   
    assertTrue(Util.isRolePresent(prop.roles, Role.DEVELOPER.toString()));
   
    //try with portal user just to be sure
    helper.loginAsPortalUser();
View Full Code Here

Examples of gwtappcontainer.shared.apis.admin.UserProp

    AdminAPI api = new AdminAPI();
    APIResponse resp = api.getRolesForLoggedInUser(user);
   
    assertTrue(resp.statusCode == Status.SUCCESS);
   
    UserProp prop = (UserProp) resp.object;
   
    assertTrue(Util.isRolePresent(prop.roles, Role.PORTAL_ADMIN.toString()));
  }
View Full Code Here

Examples of gwtappcontainer.shared.apis.admin.UserProp

    AdminAPI api = new AdminAPI();
    APIResponse resp = api.getRolesForUser(email);
   
    assertTrue(resp.statusCode == Status.SUCCESS);
   
    UserProp prop = (UserProp) resp.object;
   
    assertTrue(Util.isRolePresent(prop.roles, Role.DEVELOPER.toString()));
  }
View Full Code Here

Examples of gwtappcontainer.shared.apis.admin.UserProp

    APIResponse resp = adminApi.assignRoleToUser(email, role, user);        
   
    assertTrue(resp.statusCode == Status.SUCCESS);
   
    //ensure role is correctly added
    UserProp prop = (UserProp) adminApi.getRolesForUser(email).object;   
    assertTrue(Util.isRolePresent(prop.roles, role));
   
    //3. unassign role
    resp = adminApi.unassignRoleToUser(email, role, user);
    assertTrue(resp.statusCode == Status.SUCCESS);
View Full Code Here

Examples of gwtappcontainer.shared.apis.admin.UserProp

    response = adminApi.assignRoleToUser(email, role,
      helper.loginAsPortalReadOnly());
    assertTrue(response.statusCode == Status.ERROR_INSUFFICIENT_PERMISSION);
   
   
    UserProp prop = (UserProp) adminApi.getRolesForUser(email).object;   
    assertTrue(false == Util.isRolePresent(prop.roles, role));
   
    //3. unassign
    //developer   
    APIResponse resp = adminApi.unassignRoleToUser(email, role,
View Full Code Here

Examples of gwtappcontainer.shared.apis.admin.UserProp

    User user = helper.loginAsDeveloper();
   
    APIResponse resp = api.getRolesForLoggedInUser(user);
    assertTrue(resp.statusCode == Status.SUCCESS);
   
    UserProp prop = (UserProp) resp.object;
   
    assertTrue(null != prop);
    assertTrue(null != prop.roles);
   
    assertTrue(Util.isRolePresent(prop.roles, Role.DEVELOPER.toString()));           
View Full Code Here

Examples of gwtappcontainer.shared.apis.admin.UserProp

    User user = helper.loginAsPortalAdmin();
   
    APIResponse resp = api.getRolesForLoggedInUser(user);
    assertTrue(resp.statusCode == Status.SUCCESS);
   
    UserProp prop = (UserProp) resp.object;
   
    assertTrue(null != prop);
    assertTrue(null != prop.roles);
   
    assertTrue(Util.isRolePresent(prop.roles, Role.PORTAL_ADMIN.toString()));           
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.