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

dugan
07.56.2007 7bbe88cbb3a5a0be5e2799935e00907f755b7a0a
opendj-sdk/opends/src/server/org/opends/server/authorization/dseecompat/Permission.java
@@ -29,6 +29,7 @@
import static org.opends.server.messages.MessageHandler.getMessage;
import static org.opends.server.authorization.dseecompat.AciMessages.*;
import static org.opends.server.authorization.dseecompat.Aci.*;
import java.util.regex.Pattern;
/**
@@ -36,12 +37,30 @@
 * of an ACI look like deny(search, write).
 */
public class Permission {
    //the access type (allow,deny)
    /*
     *  The access type (allow,deny) corresponding to the ACI permission value.
     */
    private EnumAccessType accessType = null;
    /*
     * The rights (search, add, delete, ...) corresponding to the ACI rights
     * value.
     */
    private int rights;
    /*
     * Regular expression token representing the separator.
     */
    private static final String separatorToken = ",";
    private static final String rightsRegex =
        "\\s*(\\w+)\\s*(,\\s*(\\w+)\\s*)*";
    /*
     * Regular expression used to match the ACI rights string.
     */
    private static final String rightsRegex = ZERO_OR_MORE_WHITESPACE +
            WORD_GROUP + ZERO_OR_MORE_WHITESPACE +
            "(," + ZERO_OR_MORE_WHITESPACE + WORD_GROUP +
            ZERO_OR_MORE_WHITESPACE +  ")*";
    /**
     * Constructor creating a class representing a permission part of an bind