RTC Language Change bug PR-5.2-dev Pending

User tests: Successful: Unsuccessful:

avatar ditsuke
ditsuke
17 Jan 2022

Pull Request for Issue #36677.

Summary of Changes

  • Explicitly disables the "run task" button on insufficient authorization.
  • 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 administrator (not superuser) account.
  • Still as administrator, try to run it from the Scheduled tasks manager.
  • Try to run other tasks created by the super user.
  • Login as super user.
  • Check that you can run all tasks.
  • Thrash some task.
  • Check the trashed tasks.

Actual result BEFORE applying this Pull Request

As administrator (not superuser), there is no indication that the user is not authorized to run the task. The button is usable.
In all cases there is an error message.
Only a super user can run tasks.

Expected result AFTER applying this Pull Request

As administrator (not superuser):

  • The button is enabled for tasks created by yourself and you can run these tasks.
  • The button is disabled for tasks which were created by the super user (.e.g those from a new installation). Reason for being disabled is available through a tooltip on hover.

As super user buttons of all tasks are enabled, and you can run these tasks.

When a task is trashed, the button is disabled, and a tool tip shows the reason.

Documentation Changes Required

N/A

avatar ditsuke ditsuke - open - 17 Jan 2022
avatar ditsuke ditsuke - change - 17 Jan 2022
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Jan 2022
Category Administration Language & Strings
avatar ditsuke ditsuke - change - 17 Jan 2022
Labels Added: Language Change ?
avatar brianteeman
brianteeman - comment - 17 Jan 2022

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

avatar ditsuke
ditsuke - comment - 17 Jan 2022

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.

avatar brianteeman
brianteeman - comment - 17 Jan 2022

Possibly need a new permission for that "Edit own"

avatar joomla-cms-bot joomla-cms-bot - change - 17 Jan 2022
Category Administration Language & Strings Administration Language & Strings Front End Plugins
avatar ditsuke ditsuke - change - 18 Jan 2022
The description was changed
avatar ditsuke ditsuke - edited - 18 Jan 2022
avatar HLeithner
HLeithner - comment - 27 Jun 2022

This pull request has automatically rebased to 4.2-dev.

avatar HLeithner
HLeithner - comment - 2 May 2023

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

avatar HLeithner
HLeithner - comment - 30 Sep 2023

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

avatar HLeithner HLeithner - change - 24 Apr 2024
Title
[4.1] Fix Permissions for Manually Running Scheduled Tasks
[4.4] Fix Permissions for Manually Running Scheduled Tasks
avatar HLeithner HLeithner - edited - 24 Apr 2024
avatar HLeithner
HLeithner - comment - 15 Nov 2024

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

avatar HLeithner HLeithner - change - 15 Nov 2024
Title
[4.4] Fix Permissions for Manually Running Scheduled Tasks
[5.2] Fix Permissions for Manually Running Scheduled Tasks
avatar HLeithner HLeithner - edited - 15 Nov 2024
avatar Hackwar
Hackwar - comment - 16 Jan 2025

Can you please fix the conflicts?

avatar richard67 richard67 - change - 18 Jan 2025
Labels Added: bug PR-4.4-dev PR-5.2-dev
Removed: ?
avatar richard67 richard67 - change - 18 Jan 2025
Labels Removed: PR-4.4-dev
avatar richard67
richard67 - comment - 18 Jan 2025

I was able to resolve the merge conflicts, which were mainly caused by PRs #40216 and #42746 .

It needs to be tested if this PR here and #42746 still work.

avatar richard67 richard67 - test_item - 18 Jan 2025 - Tested successfully
avatar richard67
richard67 - comment - 18 Jan 2025

I have tested this item ✅ successfully on eb813f6


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36719.

avatar dautrich dautrich - test_item - 18 Jan 2025 - Tested unsuccessfully
avatar dautrich
dautrich - comment - 18 Jan 2025

I have tested this item 🔴 unsuccessfully on eb813f6


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36719.

avatar dautrich
dautrich - comment - 18 Jan 2025

I've tested on J5.2.3 with a user belonging to user group "Administrator".

  • Without the patch applied, I was able to click on an existing task, but the task showed an error.
  • With the patch applied, the task execution button of the existing task were "greyed" out and showed a tooltip "Not authorized".
    grafik
  • But with the patch applied, I was able to create additional tasks and run them:
    grafik
avatar richard67
richard67 - comment - 18 Jan 2025

@dautrich Of course you shall be able to run your own tasks as user in the administrator group. And as administrator you shall also be able to create tasks. But the ones created by the super user are disabled. To me it seems it is workings as intended.

avatar richard67
richard67 - comment - 18 Jan 2025

P.S. Without the PR, one error is that you can not run tasks which you have created when you are an administrator. This is also fixed by this PR, that’s why you can create tasks and run them as administrator.

avatar dautrich
dautrich - comment - 18 Jan 2025

Then the testing instructions seem to be misleading. It says: "Create a new task with an admin (not superuser) account." And that's what I did.

avatar richard67
richard67 - comment - 18 Jan 2025

Hmm I see the testing instructions are not precise.

avatar richard67 richard67 - change - 18 Jan 2025
The description was changed
avatar richard67 richard67 - edited - 18 Jan 2025
avatar richard67
richard67 - comment - 18 Jan 2025

@dautrich I've updated the testing instructions. Thanks for the hint.

avatar richard67 richard67 - change - 18 Jan 2025
The description was changed
avatar richard67 richard67 - edited - 18 Jan 2025
avatar richard67 richard67 - change - 18 Jan 2025
The description was changed
avatar richard67 richard67 - edited - 18 Jan 2025
avatar richard67
richard67 - comment - 18 Jan 2025

P.S. I've updated again testing instructions and added a test for trashed tasks.

avatar exlemor exlemor - test_item - 18 Jan 2025 - Tested successfully
avatar exlemor
exlemor - comment - 18 Jan 2025

I have tested this item ✅ successfully on eb813f6

I have tested this successfully.

(thanks for the updated testing instructions Richard!)

( Cool PR btw, thanks to all that made it possible ).


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36719.

avatar dautrich dautrich - test_item - 18 Jan 2025 - Tested successfully
avatar dautrich
dautrich - comment - 18 Jan 2025

I have tested this item ✅ successfully on eb813f6


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36719.

avatar richard67 richard67 - change - 18 Jan 2025
Status Pending Ready to Commit
avatar richard67
richard67 - comment - 18 Jan 2025

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/36719.

avatar richard67
richard67 - comment - 18 Jan 2025

Thanks for testing.

avatar richard67 richard67 - change - 18 Jan 2025
Labels Added: RTC
avatar Hackwar
Hackwar - comment - 18 Jan 2025

Thank you!

avatar Hackwar Hackwar - close - 18 Jan 2025
avatar Hackwar Hackwar - merge - 18 Jan 2025
avatar Hackwar Hackwar - change - 18 Jan 2025
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2025-01-18 22:24:11
Closed_By Hackwar

Add a Comment

Login with GitHub to post a comment