? Pending

User tests: Successful: Unsuccessful:

avatar csthomas
csthomas
3 Mar 2017

Pull Request for a few fixes from my previous non B/C PR #14279

Summary of Changes

  • Do not force to set rules from com_content component to every new article.
    Use inheritance (simple '{}') as in other extensions.
  • Clean empty actions from rules: {'core.edit': {}, 'core.delete: {}'} to {}
  • Use faster JAccessRules::getData() instead of json_decode() and json_encode() in method JAccessRules::__toString()
  • Add missing column asset_id in tests/unit/schema/ddl.sql

Testing Instructions

  1. Install joomla (I have installed with sample - Test English)
  2. Go to backend Content -> Articles -> click on button Options -> select Tab Permissions
  3. Change permissions for Manager from 'Inherit' to 'Allowed' for Create, Edit, Delete:
    samplea1
  4. Save and Close.
  5. Create a new Article, in permission tab as above(for Manager) permission are set as 'Inherit' - it is OK.
  6. Save and check again - Now a few permissions has been changed from 'Inherit' to 'Allowed' - it is not OK.
  7. Apply patch
  8. Back to point 5 (create a new article)
  9. After save, permissions for Manager stay 'Inherit'. - that is now OK.
  10. Change permission for Manager for Edit action from 'Inherit' to 'Allowed' and Save.
  11. Change tab to user group 'Editor':
    samplea1
  12. Action Edit is as 'Allowed'. Change it to 'Inherit' and Save.
  13. Back to permissions for Manager and check if Edit action has not been reset and still has selected 'Allowed'.

Expected result

A new article by default inherit permissions from parent category (after stored).

Actual result

A new article after save always has copy of permissions from com_content asset.

Documentation Changes Required

None

avatar csthomas csthomas - open - 3 Mar 2017
avatar csthomas csthomas - change - 3 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 3 Mar 2017
Category Administration com_config Libraries Unit Tests
avatar csthomas csthomas - change - 3 Mar 2017
The description was changed
avatar csthomas csthomas - edited - 3 Mar 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Mar 2017

Questions about Test Instructions:

Go to backend and create a new article, go to permissions tab and check if permissions are sets as 'inherit'.

Check in each User Group for each Action?

After save it should stay as 'inherit'.

same as above.

If you set 'inherit' for group ex. Manager then it should not reset permissions for other groups.

sounds like this is the Problem but on testing i see no "reset permissions for other groups"

I don't understand the Issue and what to test.

avatar csthomas
csthomas - comment - 5 Mar 2017

@franz-wohlkoenig Some time ago I had a bug which reset permission to 'inherit' for other user groups if I only changed permission to 'inherit' for only one user group.

Ex. of old bug:
In article edit, permission tab, set permission for Edit to "Allowed" for Manager and Publisher.
After save article, change permission for Edit to "Inherit" for only Manager and save.
Now check if permission for Publisher is still Allowed and not 'Inherit'.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Mar 2017

@csthomas will test today, thanks for Infos.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 5 Mar 2017

Using default user groups:

bildschirmfoto 2017-03-05 um 14 17 18

and work your Example:

In article edit, permission tab, set permission for Edit to "Allowed" for Manager and Publisher.
After save article, change permission for Edit to "Inherit" for only Manager and save.
Now check if permission for Publisher is still Allowed and not 'Inherit'.

with and -out PR got in Manager: Inherited and in Publisher: Allowed (different Trees).

Creating an Article (before Save) all Groups are inherited.

avatar csthomas csthomas - change - 6 Mar 2017
The description was changed
avatar csthomas csthomas - edited - 6 Mar 2017
avatar csthomas
csthomas - comment - 6 Mar 2017

@franz-wohlkoenig I have made a new better test instruction. Please test again.

avatar csthomas csthomas - change - 6 Mar 2017
The description was changed
avatar csthomas csthomas - edited - 6 Mar 2017
avatar csthomas csthomas - change - 6 Mar 2017
The description was changed
avatar csthomas csthomas - edited - 6 Mar 2017
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Mar 2017

thanks @csthomas will test later.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Mar 2017
  1. Action Edit is as 'Allowed'. Change it to 'Inherit' and Save.

After Save Action Edit is set on Inherited. A Difference to Instructions the sad it is Allowed.

avatar csthomas
csthomas - comment - 6 Mar 2017

Allowed should be preserved/not changed on different user group permission.

avatar csthomas
csthomas - comment - 6 Mar 2017

Manager and Editor has the same value 'Allowed' for Edit action field.
Now you change for Editor this field to 'Inherit' and check if only this field has been changed and second one still is as 'Allowed'.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Mar 2017

Group Editor has Setting Inherited, not Allowed like wrote in Instructions (thanks for clear Instructions).

avatar csthomas
csthomas - comment - 6 Mar 2017

I suppose you do not understand me, May be I explained it in a wrong way:
Please test again points 10..13:

  • on patched joomla, on some existed article, only Edit action is important.
  • for Editor and Manager user group

On start, these two user groups has to be set as "Allowed".
As we have "Allowed" saved we can go to next step.

Change permission to "Inherit" for only one user group and save.
After that one (changed) user group should be as 'Inherit' and second should stay as 'Allowed'.

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Mar 2017

Looks like misunderstanding, i try in another Words:

  1. Change tab to user group 'Editor': Action Edit is as 'Allowed'. Change it to 'Inherit' and Save.

I understand that opening Usergroup Editor Action Edit ist set on Allowed, but its set on Inherited:
bildschirmfoto 2017-03-06 um 16 35 14

  1. Action Edit is as 'Allowed'. Change it to 'Inherit' and Save.

So this is not possible cause Inherited set.

avatar csthomas
csthomas - comment - 6 Mar 2017

I understand that opening Usergroup Editor Action Edit ist set on Allowed, but its set on Inherited

But before you have to toggle to Manager tab check that.

You have to do changes in Editor, but check Manager.
When you save setting for Editor group with 'Inherit' value then php code do some clean up for array, and should not erase too much. I means should not change settings for other user group like Manager.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 6 Mar 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Mar 2017

I have tested this item successfully on 08d10b2


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

avatar csthomas
csthomas - comment - 6 Mar 2017

Thanks for your patience :)

avatar franz-wohlkoenig
franz-wohlkoenig - comment - 6 Mar 2017

Thanks for your patience too ;-)

avatar csthomas csthomas - change - 7 Apr 2017
The description was changed
avatar csthomas csthomas - edited - 7 Apr 2017
avatar sanderpotjer
sanderpotjer - comment - 30 Apr 2017

I have tested this item successfully on 08d10b2

Great PR, thanks!


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

avatar sanderpotjer sanderpotjer - test_item - 30 Apr 2017 - Tested successfully
avatar franz-wohlkoenig franz-wohlkoenig - change - 1 May 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 1 May 2017

RTC after two successful tests.

avatar rdeutz rdeutz - change - 22 May 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-05-22 18:12:00
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 22 May 2017
avatar rdeutz rdeutz - merge - 22 May 2017
avatar olleharstedt
olleharstedt - comment - 6 Jul 2017

After updating to 3.7.3, we got "Invalid parent ID" for our own JTable. Is this commit related?

avatar rdeutz
rdeutz - comment - 6 Jul 2017

@olleharstedt please open a new issue, comments on closed/merged PR get lost

avatar csthomas
csthomas - comment - 6 Jul 2017

Please open a new issue, but meantime:

You may try to revert libraries/joomla/table/asset.php for test or other files too to version from 3.7.2, but the reason is that in your db table #__assets does not exist parent row.

Check your table and find which assets rows has invalid parent_id, means parent_id points to not existed row id.

Example query:

SELECT a.* FROM `#__assets` a LEFT JOIN `#__assets` b ON a.parent_id = b.id WHERE b.id IS NULL 

The correct result is only one row with name = 'root.1'.

avatar olleharstedt
olleharstedt - comment - 6 Jul 2017

Thank you.

@csthomas Query checks out, only returns root.1.

Add a Comment

Login with GitHub to post a comment