? ? ? ? Pending

User tests: Successful: Unsuccessful:

avatar laoneo
laoneo
17 Mar 2017

Summary of Changes

The issue with the SQL field is that it can be risky when none super admins can edit it and define the SQL query setting. This query will be then executed on every article edit or view access. Like that it will be possible to define update queries which can be abused to grant super admin privileges to none super admins.

This PR changes the behavior of the SQL field, that only Super Admins can create it. Additionally it sets the "Edit" permission for all none Super Admin groups to deny. Means the super admin must explicitly allow none super admin groups to edit the field. This is done the way, that the "Public" group has the deny flag, where all (except the super admin) groups will inherit from.

I would like to thank @yvesh and @SniperSister for their help on that.

Testing Instructions

  1. Create a new SQL custom field as none super admin.
  2. Create a new SQL field as super admin.
  3. Create a new SQL field as super admin and set the Administrator Group to "Allow".

Expected result

  1. An error is shown and the field is not saved.
  2. The "Public" group must have the "Deny" flag set for the edit permission. All other groups must inherit that flag and it should not being allowed to edit the field. A warning is shown that the permissions got updated automatically.
  3. The Administrator group should have the Allow permission.

Actual result

  1. No erro is shown. The field got created.
  2. No warning is shown. The field got created and the permissions not automatically adjusted.
  3. The Administrator group should have the Allow permission.

Documentation Changes Required

For the SQL custom field the behavior must be explained in the documentation.

avatar laoneo laoneo - open - 17 Mar 2017
avatar laoneo laoneo - change - 17 Mar 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 17 Mar 2017
Category Administration com_fields Language & Strings Front End Plugins
avatar laoneo laoneo - change - 17 Mar 2017
The description was changed
avatar laoneo laoneo - edited - 17 Mar 2017
avatar brianteeman
brianteeman - comment - 17 Mar 2017

This is locking the Edit permission
Shouldnt we also be locking the Edit Custom Field Value
screenshotr12-14-41

avatar laoneo laoneo - change - 17 Mar 2017
Labels Added: ? ?
avatar laoneo
laoneo - comment - 17 Mar 2017

The edit custom field value is only used when editing an article to determine of the field can be changed.

avatar laoneo
laoneo - comment - 20 Mar 2017

As confirmed with the JSST, this pr should become a release blocker label.

avatar brianteeman
brianteeman - comment - 20 Mar 2017

Added release blocker label as requested

avatar laoneo
laoneo - comment - 20 Mar 2017

Thanks!

avatar brianteeman brianteeman - test_item - 24 Mar 2017 - Tested successfully
avatar brianteeman
brianteeman - comment - 24 Mar 2017

I have tested this item successfully on ccea52c


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

avatar joomdonation joomdonation - test_item - 25 Mar 2017 - Tested successfully
avatar joomdonation
joomdonation - comment - 25 Mar 2017

I have tested this item successfully on ccea52c

Works as described

PS: Look like the entered SQL command is not validated on save? The field still being saved even when I enter a wrong SQL command


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

avatar laoneo
laoneo - comment - 25 Mar 2017

The SQL error will be catched when the article is edited.

avatar jeckodevelopment jeckodevelopment - change - 25 Mar 2017
Status Pending Ready to Commit
Labels
avatar jeckodevelopment
jeckodevelopment - comment - 25 Mar 2017

RTC


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

avatar rdeutz rdeutz - change - 25 Mar 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-03-25 19:49:58
Closed_By rdeutz
Labels Added: ? ?
avatar rdeutz rdeutz - close - 25 Mar 2017
avatar rdeutz rdeutz - merge - 25 Mar 2017

Add a Comment

Login with GitHub to post a comment