joomla-cms icon indicating copy to clipboard operation
joomla-cms copied to clipboard

[4.1] Fix Permissions for Manually Running Scheduled Tasks

Open ditsuke opened this issue 3 years ago • 4 comments

Pull Request for Issue #36677.

Summary of Changes

  • [x] Explicitly disables the "run task" button on insufficient authorization.
  • [x] Adds tooltip to give context on disabling the button.
  • [ ] Change default permission level for running tasks/grant access to creator.
  • [ ] Prevent manual runs from being publicly accessible regardless of permission levels. Ref: #36453#issuecomment-1001793962 / @PhilETaylor

Testing Instructions

  • Create a new task with an admin (not superuser) account.
  • Try to run it from the Scheduled tasks manager.

Actual result BEFORE applying this Pull Request

There is no indication that the user is not authorized to run the task. The button is usable.

Expected result AFTER applying this Pull Request

The button is disabled. Reason for being disabled is available through a tooltip on hover.

Documentation Changes Required

N/A

ditsuke avatar Jan 17 '22 15:01 ditsuke

How can it make sense for a user to be able to create a new task and setup lazy loading etc but not be able to run the task directly

brianteeman avatar Jan 17 '22 15:01 brianteeman

How can it make sense for a user to be able to create a new task and setup lazy loading etc but not be able to run the task directly

Definitely, now that I think of it the creator should be able to run them manually as a default. I'll work on enabling that behavior before opening this PR.

ditsuke avatar Jan 17 '22 15:01 ditsuke

Possibly need a new permission for that "Edit own"

brianteeman avatar Jan 17 '22 15:01 brianteeman

This pull request has automatically rebased to 4.2-dev.

HLeithner avatar Jun 27 '22 13:06 HLeithner

This pull request has been automatically rebased to 4.3-dev.

HLeithner avatar May 02 '23 16:05 HLeithner

This pull request has been automatically rebased to 4.4-dev.

HLeithner avatar Sep 30 '23 22:09 HLeithner