? ? Pending

User tests: Successful: Unsuccessful:

avatar joomdonation
joomdonation
22 Feb 2020

Pull Request for Issue #28013.

Summary of Changes

This PR fixes wrong cache logic implemented in UsergrouplistField field type. Quote from @mbabker:

Truthfully, that cache has some bad logic. The cache needs to account for the checksuperuser attribute and whether the current user is a super user and not just the element (whatever that actually is). Because THAT has more impact on whether the data should be different than whether the XML has a different structure.

So instead of caching field options base on the field xml definition, we will just cache base on data of the checksuperuser attribute and whether the current user is a super user and not just the element (personal, I think on a page load, just cache it base on checksuperuser attribute value should be enough)

Testing Instructions

  1. Apply patch. Then go to Users -> Manage, click on Options button in the toolbar

  2. Test case #1: Check and make sure the user groups displayed in New User Registration Group and Guest User Group is still OK (basically, same as before)

  3. Test case #2: Test cache behavior:

Documentation Changes Required

No

avatar joomdonation joomdonation - open - 22 Feb 2020
avatar joomdonation joomdonation - change - 22 Feb 2020
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 22 Feb 2020
Category Libraries
avatar HLeithner
HLeithner - comment - 22 Feb 2020

Thanks for your pr @joomdonation but we don't add new features to j3, please remove the new option and only remove the caching.

If you can make a pr for j4 with the new attribute, I'm not really sure if this is a good attribute or way to do it because of the dynamic our acl has but maybe it's enough to solve simple requirements.

avatar joomdonation
joomdonation - comment - 22 Feb 2020

@HLeithner I submitted this PR to staging because if this is accepted, it can be used to address the issue #27262 (security risk causes by wrong settings by Super Users who don't understand much about Joomla ACL).

BTW, there is a PR which tries to address that issue submitted for Joomla 3, too #27629

So please look at it and let me know if you still want to move this new attributesto Joomla 4 only.

avatar HLeithner
HLeithner - comment - 22 Feb 2020

I will check this with @joomla/security thx for the info

avatar Bakual
Bakual - comment - 22 Feb 2020

Actually, #28011 is the correct fix for the issue. We don't need another way of excluding groups.

avatar joomdonation
joomdonation - comment - 22 Feb 2020

@Bakual It could be different thing, please see my comment here #28011 (comment)

avatar joomdonation joomdonation - change - 23 Feb 2020
Labels Added: ?
avatar joomdonation joomdonation - change - 23 Feb 2020
The description was changed
avatar joomdonation joomdonation - edited - 23 Feb 2020
avatar joomdonation
joomdonation - comment - 23 Feb 2020

So I changed the PR to only fixes the wrong cache logic, update the testing instructions. This PR is now ready for testing.

avatar joomdonation joomdonation - change - 23 Feb 2020
Title
Fix + Improve UsergrouplistField field type
Fix cache logic in UsergrouplistField field type
avatar joomdonation joomdonation - edited - 23 Feb 2020
avatar ReLater
ReLater - comment - 26 Feb 2020

I have tested this item successfully on 79a71ef

Like instructed.


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

avatar ReLater ReLater - test_item - 26 Feb 2020 - Tested successfully
avatar Quy
Quy - comment - 27 Feb 2020

I have tested this item successfully on 79a71ef


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

avatar Quy Quy - test_item - 27 Feb 2020 - Tested successfully
avatar Quy Quy - change - 27 Feb 2020
Status Pending Ready to Commit
avatar Quy
Quy - comment - 27 Feb 2020

RTC


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

avatar HLeithner
HLeithner - comment - 4 Mar 2020

Thanks

avatar HLeithner HLeithner - change - 4 Mar 2020
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2020-03-04 21:05:57
Closed_By HLeithner
Labels Added: ?
avatar HLeithner HLeithner - close - 4 Mar 2020
avatar HLeithner HLeithner - merge - 4 Mar 2020

Add a Comment

Login with GitHub to post a comment