? Success

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
8 Nov 2016

Summary of Changes

This is basicly the same problem as #12800.

The fields ACL for displaying the batch button is not correct. It's based on a context var.
As it is, it's trying to check ACL for an asset with the name of com_content.article (or com_users.user or com_contact.contact) when it should be checking the ACL of the component com_content (or com_users or com_contact).

This PR aims to correct that.

Testing Instructions

  1. Code review.
  2. Test if "Batch" button appears on com_fields fields (ex: Content -> Fields) when a user is not able to core.create in the component.
  3. Apply patch
  4. Repeat step 2, no button now

Documentation Changes Required

None.

avatar andrepereiradasilva andrepereiradasilva - open - 8 Nov 2016
avatar andrepereiradasilva andrepereiradasilva - change - 8 Nov 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 8 Nov 2016
Category Administration Components
avatar andrepereiradasilva andrepereiradasilva - change - 8 Nov 2016
The description was changed
Labels Added: ?
avatar andrepereiradasilva andrepereiradasilva - edited - 8 Nov 2016
avatar andrepereiradasilva andrepereiradasilva - change - 8 Nov 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 8 Nov 2016
avatar andrepereiradasilva andrepereiradasilva - change - 8 Nov 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 8 Nov 2016
avatar andrepereiradasilva andrepereiradasilva - change - 8 Nov 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 8 Nov 2016
avatar sanderpotjer
sanderpotjer - comment - 13 Nov 2016

I have tested this item successfully on 29af22d


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

avatar sanderpotjer sanderpotjer - test_item - 13 Nov 2016 - Tested successfully
avatar andrepereiradasilva
andrepereiradasilva - comment - 14 Nov 2016

@laoneo when you have time please check this also.

avatar infograf768
infograf768 - comment - 14 Nov 2016

Please. folks, wait
PLT has not decided yet if com_fields is allowed or not to use com_categories, therefore also the batch.

avatar laoneo
laoneo - comment - 14 Nov 2016

I could not reproduce the issue. I'v tested it on a fresh Joomla installation:

  • Created a new user and assigned it to the Administrator group
  • Denied the Create permission in the Article Options image
  • Logged in on a private browser window with the new user.

With or without the patch on both cases the Batch button is not shown.

@infograf768 please don't tell people not to fix things as this PR has nothing to do with your com_categories problem in com_fields.

avatar andrepereiradasilva
andrepereiradasilva - comment - 14 Nov 2016

@laoneo it actually works because when checking com_content.article the asset is not found and then it's falling back to the component ACL (ex: com_content).
The fact it works as it is does mean it's done in the correct way. It should not work like that, the ACL check should be done properly.

Do this, and you will see it what i mean:

  • Apply #12850 patch
  • Enable global debug and debug system plugin
  • Login as Administrator, go to any com_fields (ex: Content -> Fields) and check the debug console, "Log Messages" separator. You will see something like this: image
avatar laoneo
laoneo - comment - 14 Nov 2016

So I need #12850 to make this work?

avatar andrepereiradasilva
andrepereiradasilva - comment - 14 Nov 2016

no. #12850 just shown a debug message when an asset is not found so it's easier to track this wrong ACL checks.

avatar laoneo
laoneo - comment - 14 Nov 2016

So what did then do wrong on my end. I really did only these three steps on a fresh Joomla installation.

avatar andrepereiradasilva
andrepereiradasilva - comment - 14 Nov 2016

@laoneo you did nothing wrong, your test it's correct. works before patch and works after patch.

only after this PR we do the correct ACL check, ie, we don't do a wrong ACL check that fallback to the correct ACL check.

avatar laoneo
laoneo - comment - 14 Nov 2016

I have tested this item successfully on 29af22d

Thanks for clarification @andrepereiradasilva


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

avatar laoneo laoneo - test_item - 14 Nov 2016 - Tested successfully
avatar zero-24 zero-24 - change - 14 Nov 2016
Milestone Added:
avatar zero-24 zero-24 - change - 14 Nov 2016
Milestone Added:
Status Pending Ready to Commit
Labels Added: ?
avatar zero-24 zero-24 - change - 14 Nov 2016
Labels
avatar rdeutz rdeutz - reference | 4c8344d - 15 Nov 16
avatar rdeutz rdeutz - merge - 15 Nov 2016
avatar rdeutz rdeutz - close - 15 Nov 2016
avatar rdeutz rdeutz - merge - 15 Nov 2016
avatar rdeutz rdeutz - close - 15 Nov 2016
avatar rdeutz rdeutz - change - 15 Nov 2016
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-11-15 21:43:36
Closed_By rdeutz
avatar joomla-cms-bot joomla-cms-bot - change - 15 Nov 2016
Category Administration Components Administration com_fields Components
avatar andrepereiradasilva andrepereiradasilva - head_ref_deleted - 15 Nov 2016

Add a Comment

Login with GitHub to post a comment