? ? ? Success

User tests: Successful: Unsuccessful:

avatar tflm84
tflm84
23 Oct 2015

Introduction

This PR fixes a problem of saving permissions within the Global Configuration, Components, Articles, Modules, and anywhere else where permissions can be configured.
If too many permission changes are made, the request is too large, because all settings are transmitted in one big form.
If this form is too big, some data get lost and are not stored in the database. Even worse, there is no feedback, therefore the user can not recognise that anything went wrong.

Fix

This fix splits the form when the save button is clicked. All inputfields which contain permissions will be disabled and not send during the saving progress.
Now, the permissions will be stored immediately after changing a value via AJAX. This solution leads to smaller forms and consistent storage of the permissions.
If something goes wrong, an error message will be displayed.

How to test this patch

  1. Login as administrator
  2. Go to Global Configuration / Components / Articles / Modules / ...
  3. Switch to permission tab
  4. Change any permissions
  5. A green or red checkmark will light up

Worked as a group on that issue: @icampus, @d03ms

avatar tflm84 tflm84 - open - 23 Oct 2015
avatar tflm84 tflm84 - change - 23 Oct 2015
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 23 Oct 2015
Labels Added: ? ?
avatar zero-24 zero-24 - change - 23 Oct 2015
Milestone Added:
avatar zero-24 zero-24 - change - 23 Oct 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 23 Oct 2015
Labels
Easy No Yes
avatar zero-24 zero-24 - change - 23 Oct 2015
Category Administration UI/UX
avatar coolman01 coolman01 - test_item - 24 Oct 2015 - Tested successfully
avatar coolman01
coolman01 - comment - 24 Oct 2015

I have tested this item :white_check_mark: successfully on 6c38d23

It works as described.
However, if for some reason the user does not want to save all the changes made in e.g. the module, and clicks the "close" button, then the permission changes are already saved. Maybe there could be a message attached to the close button to say "permission chnages saved"


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

avatar designbengel designbengel - test_item - 24 Oct 2015 - Tested successfully
avatar designbengel
designbengel - comment - 24 Oct 2015

I have tested this item :white_check_mark: successfully on 6c38d23


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

avatar zero-24 zero-24 - change - 24 Oct 2015
Status Pending Ready to Commit
Labels
avatar zero-24
zero-24 - comment - 24 Oct 2015

RTC


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

avatar joomla-cms-bot joomla-cms-bot - change - 24 Oct 2015
Labels Added: ?
avatar roland-d roland-d - change - 24 Oct 2015
Labels Removed: ?
avatar roland-d
roland-d - comment - 24 Oct 2015

I have removed the RTC tag for now because I think the PR should be updated with the feedback given by @Fedik and @dgt41

avatar joomla-cms-bot joomla-cms-bot - change - 24 Oct 2015
Labels Added: ?
avatar joomla-cms-bot
joomla-cms-bot - comment - 25 Oct 2015

This PR has received new commits.

CC: @coolman01, @designbengel


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

avatar tflm84
tflm84 - comment - 25 Oct 2015

Thanks for your feedback, i put that javascript code in a seperated file in media/system/js/. Also i used the escaped version for the error messages.

avatar dgt41
dgt41 - comment - 25 Oct 2015

@tflm84 can you rename media/system/js/permissions.js to media/system/js/permissions.min.js and the media/system/js/permissions-uncompressed.js to media/system/js/permissions.js ?

avatar dgt41
dgt41 - comment - 25 Oct 2015

And use JHtml::_('script', 'system/js/permissions.min.js', false, true, false, false, true);
instead of

        // Add Javascript for permission change
        $document = JFactory::getDocument();
        $document->addScript('../media/system/js/permissions.js');
avatar roland-d roland-d - change - 31 Oct 2015
Labels Removed: ?
avatar roland-d
roland-d - comment - 31 Oct 2015

@tflm84 Can you please update the PR with the proposed changes? On wednesday November 4th beta 1 goes out and this should be done and tested before that time, otherwise it can't be merged I am afraid. Thanks.

avatar joomla-cms-bot joomla-cms-bot - change - 31 Oct 2015
Labels Added: ?
avatar tflm84
tflm84 - comment - 1 Nov 2015

The proposed changes were implemented and can be tested now

avatar Fedik
Fedik - comment - 1 Nov 2015

@tflm84 please check the result again :wink:
what combobox doing in core.js?

avatar joomla-cms-bot
joomla-cms-bot - comment - 1 Nov 2015

This PR has received new commits.

CC: @coolman01, @designbengel


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

avatar zero-24 zero-24 - change - 2 Nov 2015
Status Ready to Commit Pending
Labels
avatar zero-24 zero-24 - test_item - 2 Nov 2015 - Tested successfully
avatar zero-24
zero-24 - comment - 2 Nov 2015

I have tested this item :white_check_mark: successfully on b621ac6

Works great. Great work here. :+1:

I have just send a very mirror CS PR at: tflm84#2 to address a space that is to much in a doc block :smile:


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

avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2015
Labels Removed: ?
avatar dgt41 dgt41 - test_item - 2 Nov 2015 - Tested successfully
avatar dgt41
dgt41 - comment - 2 Nov 2015

I have tested this item :white_check_mark: successfully on b621ac6

Also works fine with the change:
JHtml::_('script', 'media/system/js/permissions.min.js', false, false, false, false, true);


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

avatar zero-24 zero-24 - alter_testresult - 2 Nov 2015 - dgt41: Tested successfully
avatar zero-24 zero-24 - alter_testresult - 2 Nov 2015 - zero-24: Tested successfully
avatar zero-24 zero-24 - change - 2 Nov 2015
Status Pending Ready to Commit
Labels
avatar zero-24
zero-24 - comment - 2 Nov 2015

RTC on testing now. Thanks :smiley:


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

avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2015
Labels Added: ?
avatar roland-d roland-d - change - 2 Nov 2015
Status Ready to Commit Pending
Labels
avatar roland-d
roland-d - comment - 2 Nov 2015

Back to pending as we need one more minor code change.


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

avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2015
Labels Removed: ?
avatar joomla-cms-bot
joomla-cms-bot - comment - 2 Nov 2015

This PR has received new commits.

CC: @coolman01, @designbengel, @dgt41, @zero-24


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

avatar roland-d
roland-d - comment - 2 Nov 2015

Code looks good. Thanks. Can we have one more round of tests please? Thanks.

avatar mironsavan mironsavan - test_item - 2 Nov 2015 - Tested successfully
avatar mironsavan
mironsavan - comment - 2 Nov 2015

I have tested this item :white_check_mark: successfully on 8a576c7

Works as expected!


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

avatar mironsavan mironsavan - test_item - 2 Nov 2015 - Tested successfully
avatar mironsavan
mironsavan - comment - 2 Nov 2015

I have tested this item :white_check_mark: successfully on 8a576c7

I have tested this succcessfull on my test site with some different combinations and it works for me


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

avatar dgt41 dgt41 - test_item - 2 Nov 2015 - Tested successfully
avatar dgt41
dgt41 - comment - 2 Nov 2015

I have tested this item successfully on 8a576c7


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

avatar zero-24 zero-24 - change - 2 Nov 2015
Status Pending Ready to Commit
Labels
avatar zero-24
zero-24 - comment - 2 Nov 2015

RTC Thanks for you work and the tests ????


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

avatar joomla-cms-bot joomla-cms-bot - change - 2 Nov 2015
Labels Added: ?
avatar roland-d roland-d - change - 2 Nov 2015
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2015-11-02 20:47:40
Closed_By roland-d
avatar roland-d roland-d - close - 2 Nov 2015
avatar wilsonge wilsonge - change - 17 Jan 2016
Labels Removed: ?
avatar infograf768
infograf768 - comment - 19 May 2016

This has broken "Inherited", in the sense that choosing inherited always calculates as "Denied"
#10552

avatar infograf768
infograf768 - comment - 29 May 2016

We also have other bugs for Permissions.
See this one:
screen shot 2016-05-29 at 08 10 55

Add a Comment

Login with GitHub to post a comment