Package com.esri.gpt.framework.security.principal

Examples of com.esri.gpt.framework.security.principal.Roles.values()


    // set role/group properties
    try {
      readUserGroups(user);
      RoleSet authRoles = user.getAuthenticationStatus().getAuthenticatedRoles();
      Roles cfgRoles = getApplicationConfiguration().getIdentityConfiguration().getConfiguredRoles();
      for (Role role: cfgRoles.values()) {
        authRoles.addAll(role.getFullRoleSet());
      }
    } catch (NamingException e) {
      // will never be thrown
    }
View Full Code Here


@Override
public void readUserGroups(User user)
  throws IdentityException, NamingException, SQLException {
  if ((user != null) && (user.getDistinguishedName().equalsIgnoreCase(getDN()))) {
    Roles cfgRoles = getApplicationConfiguration().getIdentityConfiguration().getConfiguredRoles();
    for (Role role: cfgRoles.values()) {
      Group group = new Group();
      group.setDistinguishedName(role.getKey());
      group.setKey(role.getKey());
      group.setName(role.getKey());
      user.getGroups().add(group);
View Full Code Here

  // read groups, set authenticated roles
  getQueryFunctions().readUserGroups(dirContext,user);
  Groups userGroups = user.getGroups();
  Roles configuredRoles = getConfiguration().getIdentityConfiguration().getConfiguredRoles();
  RoleSet authenticatedRoles = user.getAuthenticationStatus().getAuthenticatedRoles();
  for (Role role: configuredRoles.values()) {
    if (userGroups.containsKey(role.getDistinguishedName())) {
      authenticatedRoles.addAll(role.getFullRoleSet());
    }
  }
  user.getAuthenticationStatus().setWasAuthenticated(true);
View Full Code Here

* @return true if group is configured in geoportal
*/
protected boolean checkIfConfigured(RequestContext context,String groupIdentifier){
  boolean isConfigured = false;   
  Roles roles = buildSelectableRoles(context);
  for (Role role : roles.values()){
    if(groupIdentifier.endsWith(groupDIT)){
      if(role.getDistinguishedName().equalsIgnoreCase(groupIdentifier)) {
        isConfigured = true;
        break;
      }
View Full Code Here

* @return true if group is allowed to manage in geoportal
*/
protected boolean checkIfAllowedToManage(RequestContext context,String groupIdentifier){
  boolean isAllowedToManage = false;   
  Roles roles = buildSelectableRoles(context);
  for (Role role : roles.values()){
    if(groupIdentifier.endsWith(groupDIT)){
      if(role.getDistinguishedName().equalsIgnoreCase(groupIdentifier) && role.isManage()) {
        isAllowedToManage = true;
        break;
      }
View Full Code Here

        Node ndRole = nlRoles.item(i);
        Role role = new Role();
        role.setKey(xpath.evaluate("@key", ndRole));
        roles.add(role);
      }
      for (Role role : roles.values()) {
        role.buildFullRoleSet(roles);
      }
    }

  }
View Full Code Here

        role.setManage(Val.chkBool(xpath.evaluate("@manage", ndRole),true));
        role.setForbidden(Val.chkBool(xpath.evaluate("@forbidden", ndRole),false));
        role.setDistinguishedName(xpath.evaluate("@groupDN", ndRole));
        roles.add(role);
      }
      for (Role role : roles.values()) {
        role.buildFullRoleSet(roles);
      }
    }

    // user properties
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.