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

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


*/
private void removeUserFromGroups(User user)
  throws CredentialPolicyException, IdentityException, NamingException, SQLException {
  try {
    Groups grps = user.getGroups();
    for(Group g : grps.values()){
      removeUserFromGroup(user, g.getDistinguishedName());
    }
 
  } finally {
  }
View Full Code Here


      Groups mmGroups = getConfiguration().getIdentityConfiguration().getMetadataManagementGroups();
      if ((mmGroups != null) && (mmGroups.size() > 0)) {
        String sMmUser = Val.chkStr(sUsername.substring(0,nIdx));
        String sMmGroup = Val.chkStr(sUsername.substring(nIdx+2));
        if ((sMmUser.length() > 0) && (sMmGroup.length() > 0)) {
          for (Group group: mmGroups.values()) {
            if (sMmGroup.equalsIgnoreCase(group.getName())) {
              sUsername = sMmUser;
              credentials.setTargetedGroupDN(group.getDistinguishedName());
            }
          }
View Full Code Here

   * @param context the active request context
   */
  public void buildAllGroups(RequestContext context) {
    _list.clear();
    Groups groups = Publisher.buildSelectableGroups(context);
    for (Group g : groups.values()) {
      _list.add(new SelectItem(g.getKey(), g.getName()));
    }
  }

  /**
 
View Full Code Here

    selectableUser.setDistinguishedName("*");
    idAdapter.readUserGroups(selectableUser);
    selectableGroups = selectableUser.getGroups();*/
   
  Groups groups = idAdapter.readGroups(filter);
  for (Group g : groups.values()){
    if(isAddAttributeRequest){
      try{
        idAdapter.addAttribute(g.getDistinguishedName(), attributeName, attributeValue);
      }catch(AttributeInUseException aiue){
        // TODO : do nothing if attribute exists ? or overwrite ?
View Full Code Here

 
  String groupsJson = " \"groups\" : [";
  Groups groups = user.getGroups();
  groups.sort();
  boolean firstGroup = true;
  for (Group group : groups.values()) {
    String gkey = Val.chkStr(group.getKey());
    String name = Val.chkStr(group.getName());
    String dn = Val.chkStr(group.getDistinguishedName());
    if(!firstGroup) {
      groupsJson += ",";
View Full Code Here

    String roleDn = Val.chkStr(role.getDistinguishedName());
    String roleKey = Val.chkStr(role.getKey());
    String roleName = msgBroker.retrieveMessage(Val.chkStr(role.getResKey()));
    if(!role.isManage()) continue;
    boolean hasRole = false;
    for (Group group : groups.values()){
      String groupDn = Val.chkStr(group.getDistinguishedName());
      if(roleDn.equals(groupDn)){
        hasRole = true;
        break;
      }
View Full Code Here

* @return true if managed user role is same as groupDn
*/
protected boolean checkRole(User user,String groupDn){
  boolean isSelf = false;
  Groups groups = user.getGroups();
  for (Group group : groups.values()){
    String dn = Val.chkStr(group.getDistinguishedName());
    if(dn.equals(groupDn)){
      isSelf = true;
      break;
    }
View Full Code Here

    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

        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

    }
    */
   
    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

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.