No Code Attached Yet bug
avatar crystalenka
crystalenka
23 Jan 2022

Steps to reproduce the issue

When creating a simple workflow, I am trying to set a user group to edit only their own articles, only when the article is in a certain stage (for example "draft").

User group has "edit own" permissions in com_content, edit permissions in the example "draft" workflow stage, and no edit permissions in any other workflow stage.

Expected result

User group can edit their own articles that are in "draft", and when that article is moved to a different workflow stage, they can no longer edit that article.

Actual result

User can always edit their own articles even when they are not in "draft" stage.

System information (as much as possible)

J4.0.6
PHP 8.0.1

Additional comments

If the "edit own" permission is removed, user can edit articles only in "draft" stage.....but user can edit articles from other people, too.

This feels like it's either broken or missing a feature. Maybe an "edit own" permissions option in the workflow stage?

avatar crystalenka crystalenka - open - 23 Jan 2022
avatar joomla-cms-bot joomla-cms-bot - change - 23 Jan 2022
Labels Added: No Code Attached Yet
avatar joomla-cms-bot joomla-cms-bot - labeled - 23 Jan 2022
avatar Quy Quy - change - 23 Jan 2022
Labels Added: ?
avatar Quy Quy - labeled - 23 Jan 2022
avatar chmst chmst - labeled - 23 Jan 2022
avatar shagungarg0
shagungarg0 - comment - 24 Jan 2022

Can i work on this issue?

avatar crystalenka
crystalenka - comment - 24 Jan 2022

Can i work on this issue?

Anyone can propose a fix in a PR. :) What do you think the best way to handle this is?

avatar chmst
chmst - comment - 9 Feb 2022

Not as easy as it lookde on the first glance.

avatar chmst chmst - unlabeled - 9 Feb 2022
avatar bembelimen
bembelimen - comment - 9 Feb 2022

Therefor you need a workflow plugin. Very rough steps which has to be done:
Create workflow plugin with the following functions:

  • Show the article (or if it's generic, the supported item) permission rooster in the transition
  • Disable the permission rooster in the article (optional?)
  • when the transition is executed, update the article permission via the plugin based on the set up configuration from the transition.
avatar chmst chmst - change - 9 Feb 2022
Labels Removed: ?
avatar chmst chmst - unlabeled - 9 Feb 2022
avatar Hackwar Hackwar - change - 17 Feb 2023
Labels Added: bug
avatar Hackwar Hackwar - labeled - 17 Feb 2023

Add a Comment

Login with GitHub to post a comment