Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-8367

The user sending Watchlist page modified events when jobs are triggered is the wrong one

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Minor
    • None
    • 4.2
    • None
    • Unknown
    • N/A
    • N/A

    Description

      The reason is that when the job is scheduled the XWiki Context is saved and then when the job is triggered, it's the current user in that context that is used. We have 2 options:

      • When a job is scheduled, set the current user to be the context user (my preference since it solves all other user issues)
      • Specifically when a Watchlist job is triggered, clone and modify the XWiki Context to set the context user and then discard the clone (or set the context user and then put back the previous one).

      Since I can't think of any use case that would need to know the user who scheduled the job, I'm going to go with the first solution. If we need it in the future, we could always save it under a different key in the XWiki Context.

      Attachments

        Activity

          People

            vmassol Vincent Massol
            vmassol Vincent Massol
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: