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

Examples of com.esri.gpt.framework.security.principal.Groups


   */
  public String buildAclGroups(Groups groups, ArrayList<String> pickedGroups) {
    // TODO: Transfer ownership of documents is an issue since
    // user might not be member of a group for acl is set for a document
    Collection<Group> grps = groups.values();
    Groups selectedGroups = new Groups();
    for (String o : pickedGroups) {
      for (Group group : grps) {
        if (group != null && group.getName().equals(o)) {
          selectedGroups.add(group);
          break;
        }
      }
    }
 
    if (selectedGroups.size() > 0) {
 
    } else {
      for (String o : pickedGroups) {
        Group group = groups.get(o);
        if (group != null) {
          selectedGroups.add(group);
        }
      }
    }
 
    StringBuffer sbAclXml = new StringBuffer();
    if (selectedGroups != null && selectedGroups.isEmpty()) {
      return null;
    }
    sbAclXml.append("<acl>");
    for (Group group : selectedGroups.values()) {
      sbAclXml.append("<principal type=\"groupDn\">");
      sbAclXml.append(Val.escapeXml(group.getDistinguishedName()));
      sbAclXml.append("</principal>");
    }
    sbAclXml.append("</acl>");
View Full Code Here


      if (user == null) {
        return false;
      }
      HashMap<String, String> acls = makeDocumentAclFromUUID(uuid);
      if (acls != null && acls.size() > 0) {
        Groups groups = user.getGroups();
        for (Group group : groups.values()) {
          String userAclKey = makeAclString(group);
          userAclKey = userAclKey.toUpperCase().trim();
          if ((userAclKey.length() > 0) && acls.containsKey(userAclKey)) {
            return true;
          }
View Full Code Here

    } catch (SQLException e) {
      LOGGER.severe(e.getMessage());
    }
    */
   
    Groups groups = user.getGroups();
    ArrayList<String> acls = new ArrayList<String>();
    for (Group group : groups.values()) {
      acls.add(makeAclString(group));
    }
    return acls.toArray(new String[0]);
  }
View Full Code Here

public IdentityConfiguration() {
  setUserAttributeMap(new UserAttributeMap());
  setConfiguredRoles(new Roles());
  setSupportedFunctions(new IdentitySupport());
  setLdapConfiguration(new LdapConfiguration(this));
  setMetadataManagementGroups(new Groups());
  setSimpleConfiguration(new SimpleIdentityConfiguration(this));
  setSingleSignOnMechanism(new SingleSignOnMechanism());
}
View Full Code Here

TOP

Related Classes of com.esri.gpt.framework.security.principal.Groups

Copyright © 2018 www.massapicom. 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.