mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
14.10.2007 67fd0c56c72c304e2a5c1ab87438edfafe23ca85
opends/src/server/org/opends/server/authorization/dseecompat/AciHandler.java
@@ -98,16 +98,10 @@
    public static String ALL_ATTRS_RESOURCE_ENTRY = "allAttrsResourceEntry";
    /**
     * String used to indicate that the evaluating ACI had a all user attributes
     * String used to indicate that the evaluating ACI had a all attributes
     * targetattr match (targetattr="*").
     */
     public static String ALL_USER_ATTRS_MATCHED = "allUserAttrsMatched";
    /**
     * String used to indicate that the evaluating ACI had a all operational
     * attributes targetattr match (targetattr="+").
     */
     public static String ALL_OP_ATTRS_MATCHED = "allOpAttrsMatched";
     public static String ALL_ATTRS_MATCHED = "allAttrsMatched";
    /**
     * This constructor instantiates the ACI handler class that performs the
@@ -609,18 +603,17 @@
     */
    private SearchResultEntry
    accessAllowedAttrs(AciLDAPOperationContainer container) {
        Entry e=container.getResourceEntry();
        List<AttributeType> typeList=getAllAttrs(e);
        for(AttributeType attrType : typeList) {
            if(container.hasAllUserAttributes() && !attrType.isOperational())
                continue;
            if(container.hasAllOpAttributes() && attrType.isOperational())
                continue;
            container.setCurrentAttributeType(attrType);
            if(!accessAllowed(container))
                e.removeAttribute(attrType);
      Entry e=container.getResourceEntry();
      List<AttributeType> typeList=getAllAttrs(e);
      for(AttributeType attrType : typeList) {
        if(container.hasACIAllAttributes() && !attrType.isOperational())
          continue;
        container.setCurrentAttributeType(attrType);
        if(!accessAllowed(container)) {
          e.removeAttribute(attrType);
        }
        return container.getSearchResultEntry();
      }
      return container.getSearchResultEntry();
    }
    /**
@@ -923,16 +916,12 @@
            ret=false;
          }
          if (ret) {
              operationContainer.clearEvalAttributes(ACI_NULL);
              operationContainer.clearACIEvalAttributesRule(ACI_NULL);
              operationContainer.setRights(ACI_READ);
              ret=accessAllowedEntry(operationContainer);
            if(ret) {
              if(!operationContainer.hasEvalUserAttributes())
                operation.setAttachment(ALL_USER_ATTRS_MATCHED,
                        ALL_USER_ATTRS_MATCHED);
              if(!operationContainer.hasEvalOpAttributes())
                operation.setAttachment(ALL_OP_ATTRS_MATCHED,
                        ALL_OP_ATTRS_MATCHED);
              if(!operationContainer.hasACIEvalAttributes())
                operation.setAttachment(ALL_ATTRS_MATCHED, ALL_ATTRS_MATCHED);
            }
          }
      }