| | |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | import org.forgerock.i18n.slf4j.LocalizedLogger; |
| | | import org.forgerock.opendj.ldap.ByteString; |
| | | import org.forgerock.opendj.ldap.DereferenceAliasesPolicy; |
| | | import org.forgerock.opendj.ldap.ModificationType; |
| | | import org.forgerock.opendj.ldap.ResultCode; |
| | |
| | | baseName = toLowerCase(rawAttributeType); |
| | | } |
| | | |
| | | AttributeType attributeType = getAttributeType(baseName); |
| | | AttributeValue attributeValue = |
| | | AttributeValues.create(attributeType, operation.getAssertionValue()); |
| | | container.setCurrentAttributeType(attributeType); |
| | | container.setCurrentAttributeValue(attributeValue); |
| | | container.setCurrentAttributeType(getAttributeType(baseName)); |
| | | container.setCurrentAttributeValue(operation.getAssertionValue()); |
| | | return isAllowed(container, operation); |
| | | } |
| | | |
| | |
| | | final List<String> URLStrings = reference.getReferralURLs(); |
| | | for (String URLString : URLStrings) |
| | | { |
| | | builder.add(AttributeValues.create(refAttrType, URLString)); |
| | | builder.add(URLString); |
| | | } |
| | | |
| | | final Entry e = new Entry(dn, null, null, null); |
| | |
| | | && container.hasRights(ACI_WRITE) |
| | | && isAttributeDN(container.getCurrentAttributeType())) |
| | | { |
| | | String DNString = null; |
| | | String dnString = null; |
| | | try |
| | | { |
| | | DNString = |
| | | container.getCurrentAttributeValue().getValue().toString(); |
| | | DN tmpDN = DN.valueOf(DNString); |
| | | dnString = container.getCurrentAttributeValue().toString(); |
| | | DN tmpDN = DN.valueOf(dnString); |
| | | // Have a valid DN, compare to clientDN to see if the ACI_SELF |
| | | // right should be set. |
| | | if (tmpDN.equals(container.getClientDN())) |
| | |
| | | catch (DirectoryException ex) |
| | | { |
| | | // Log a message and keep going. |
| | | logger.warn(WARN_ACI_NOT_VALID_DN, DNString); |
| | | logger.warn(WARN_ACI_NOT_VALID_DN, dnString); |
| | | } |
| | | } |
| | | |
| | |
| | | { |
| | | for (Attribute a : attrList) |
| | | { |
| | | for (AttributeValue v : a) |
| | | for (ByteString v : a) |
| | | { |
| | | container.setCurrentAttributeValue(v); |
| | | container.setRights(ACI_WRITE_DELETE); |
| | |
| | | |
| | | if (!modAttr.isEmpty()) |
| | | { |
| | | for (AttributeValue v : modAttr) |
| | | for (ByteString v : modAttr) |
| | | { |
| | | container.setCurrentAttributeType(modAttrType); |
| | | switch (m.getModificationType().asEnum()) |
| | |
| | | { |
| | | for (Attribute attr : modifiedAttrs) |
| | | { |
| | | for (AttributeValue val : attr) |
| | | for (ByteString val : attr) |
| | | { |
| | | container.setCurrentAttributeValue(val); |
| | | container.setRights(ACI_WRITE_ADD); |
| | |
| | | { |
| | | dn = DN.rootDN(); |
| | | } |
| | | Aci.decode(v.getValue(), dn); |
| | | // validate ACI syntax |
| | | Aci.decode(v, dn); |
| | | } |
| | | catch (AciException ex) |
| | | { |
| | |
| | | entry.getOperationalAttribute(aciType, null); |
| | | for (Attribute attribute : attributeList) |
| | | { |
| | | for (AttributeValue value : attribute) |
| | | for (ByteString value : attribute) |
| | | { |
| | | try |
| | | { |
| | | Aci.decode(value.getValue(), entry.getName()); |
| | | // validate ACI syntax |
| | | Aci.decode(value, entry.getName()); |
| | | } |
| | | catch (AciException ex) |
| | | { |