Skip to content

[5.3] Fix field group permission check#44956

Merged
rdeutz merged 2 commits intojoomla:5.3-devfrom
joomdonation:fix_field_group_permission_check
Feb 27, 2025
Merged

[5.3] Fix field group permission check#44956
rdeutz merged 2 commits intojoomla:5.3-devfrom
joomdonation:fix_field_group_permission_check

Conversation

@joomdonation
Copy link
Contributor

Pull Request for Issue #44542.

Summary of Changes

Currently, the GroupModel model uses wrong asset name for permission check, so permission checking for field groups does not work at all. The right name of assist is something like com_content.fieldgroup.20 but we are checking using com_content.article.fieldgroup.20 . This PR fixes that wrong behavior

Testing Instructions

  • Use Joomla 5.3
  • Create a new field group for Content. Look at Permissions tab, set Edit State permission of that field for Administrator user group to Denied.
  • Save it.
  • Logout, then login using an Administrator account.
  • Check on the checkbox next to the field group and try to use Publish button in the toolbar to publish that
  • Try to click on field group to edit

Actual result BEFORE applying this Pull Request

You can publish field group, although Administrator does not have permission to do that.
You can change value for Published field of the field group

Expected result AFTER applying this Pull Request

  • There is an error message when try to publish that field group
  • You are not allowed to change Published field for the field group

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@crommie
Copy link

crommie commented Feb 22, 2025

I have tested this item ✅ successfully on 3a9733f

Followed instructions, works as described


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

@komalm
Copy link

komalm commented Feb 22, 2025

I have tested this item ✅ successfully on 3a9733f

Expected Results After Applying the Patch
The Published field should be disabled or inaccessible when editing the field group


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

@joomdonation
Copy link
Contributor Author

RTC. Thanks for testing.


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

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Feb 22, 2025
@rdeutz rdeutz added the bug label Feb 27, 2025
@rdeutz rdeutz merged commit 1d7650b into joomla:5.3-dev Feb 27, 2025
3 checks passed
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Feb 27, 2025
@rdeutz rdeutz added this to the Joomla! 5.3.0 milestone Feb 28, 2025
@joomdonation joomdonation deleted the fix_field_group_permission_check branch March 9, 2025 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants