Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-6212

AccessControlAction: minor improvement when user or group privileges are empty

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0, 1.8.0
    • core
    • None

    Description

      the current code avoids retrieving the ac policy only if both the configured user and group privileges are empty. this be improved by comparing the configured privileges with the type of the authorizable to be processed. Instead of

      if (groupPrivilegeNames.length == 0 && userPrivilegeNames.length == 0) {
                  log.debug("No privileges configured for groups and users; omit ac setup.");
                  return;
              }
      

      and later testing for >1 privileges again it should do something like

      if (groupPrivilegeNames.length == 0 && authorizable.isGroup()) {
          // log + return
      } else if (userPrivilegeNames.length == 0 && !authorizable.isGroup()) {
         // log + return
      }
      

      alex.parvulescu, fyi.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: