Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-15712

Use AutoClosable pattern allowing system login when opening a directory session

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 6.0
    • Fix Version/s: QualifiedToSchedule
    • Component/s: Directory

      Description

      To implement in a generic way what has been done as a quick fix for NXP-15702, following NXP-13724.

      Something like:

      try (Session session = directoryService.open(DIRECTORY_NAME)) {
          // Do some stuff with session
      }
      

      And if a system login is needed, do it using a new method which would do the login and logout on close:

      try (Session session = directoryService.openAsSystem(DIRECTORY_NAME)) {
          // Do some stuff with session
      }
      

      Will need to refactor at least the code from TokenAuthenticationServiceImpl impacted by NXP-15702.
      Also code form nuxeo-signature addon, in service CUserServiceImpl.java could benefit from this, see NXP-15448.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated: