Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-9957

Hardcoded list of restriction names in RepPolicyEntryHandler.RepPolicyParser

    XMLWordPrintableJSON

Details

    Description

      the code at

      https://github.com/apache/sling-org-apache-sling-feature-cpconverter/blob/master/src/main/java/org/apache/sling/feature/cpconverter/handlers/RepPolicyEntryHandler.java#L121

      hardcodes the names of the supported restrictions. while those listed are the restrictions currently supported by oak out of the box, oak allows for customization (see jackrabbit.apache.org/oak/docs/security/authorization/restriction.html) and the set of supported restrictions may also evolve in oak.

      therefore the list should not be hardcoded. if obtaining the list of supported restrictions from oak is not an option, it might be better to assume that all child-properties of the protected rep:restrictions (primary type rep:Restrictions) node below a given access control entry are actually restrictions and treat them accordingly.

      Attachments

        Issue Links

          Activity

            People

              angela Angela Schreiber
              angela Angela Schreiber
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: