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

Find a bettter way to mark a WOPI request

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 10.3
    • Component/s: WOPI
    • Epic Link:
    • Tags:
    • Sprint:
      nxfit 10.3.7
    • Story Points:
      2

      Description

      Currently, the LockHelper#markAsWOPIUser(Principal principal) and LockHelper#isWOPIUser(Principal principal) methods rely on the principal for synchronization which could be improved since:

      • It doesn't protect against other threads that would want to modify the context data, which was not designed to be thread-safe (HashMap).
      • It is a hack: what we want to mark is the current request. We could simply use a ThreadLocal, if there's no risk of spawning other threads asynchronously. Indeed, nothing guarantees that the NuxeoPrincipal objects musn't be shared, (we could imagine some cache).

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours
                  3h