Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor allowEdit of backend category controller #11547

Merged
merged 2 commits into from
Aug 26, 2016

Conversation

ggppdk
Copy link
Contributor

@ggppdk ggppdk commented Aug 10, 2016

Make category controller similar to PRs

#11503
#11502
#11511

Testing instructions

Test that edit and edit own in backend category manager work properly

@ggppdk
Copy link
Contributor Author

ggppdk commented Aug 15, 2016

@wilsonge

please do not forget of this one, it is related to the other PRs

@ggppdk ggppdk changed the title Refactor category controller Refactor allowEdit of category controller Aug 15, 2016
@ggppdk ggppdk changed the title Refactor allowEdit of category controller Refactor allowEdit of backend category controller Aug 16, 2016
@andrepereiradasilva
Copy link
Contributor

ok so i just found on ething that seems an issue, or at leaset and inconsistency

  • use a user with "Administrator" group
  • create with that user this two categories

image

  • Create another category with super user so it stays like this

image

  • At com_content set Edit as Denied for the "Administrator" group
  • At "Test ACL" level don't change permission
  • At "Test ACL Sub" level set "Edit Own to "Denied"
  • At "Test ACL Sub (Super User)" level don't change permission
  • Now use the test user and you will get something like this
    image

All ok.

  • Now try to access /administrator/index.php?option=com_categories&task=category.edit&id=12&extension=com_content (replace 12 for the id of the "Test ACL Sub (Super User)" category). You get
    image
  • Now try to access /administrator/index.php?option=com_categories&task=category.edit&id=11&extension=com_content (replace 11 for the id of the "Test ACL Sub" category). Here, instead of getting the "Edit not allowed" error (as all the other cases) you go to the "Edit" layout, but without save buttons
    image

This happens with and without your patch.
Can you check if this is the supposed behaviour?

@ggppdk
Copy link
Contributor Author

ggppdk commented Aug 19, 2016

Good catch, thanks

i replicated it , for an (administrator) user that owns the record (category),
and "edit own" was denied for administrator usergroup

In my local testing copy,
i did not have that check included (so it was working properly in my tests ...),

and when editing the file via Github UI, i failed to remove it from the old code

please retest

@andrepereiradasilva
Copy link
Contributor

I have tested this item ✅ successfully on 0767861

Seems to work fine now.


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

@dgrammatiko
Copy link
Contributor

I have tested this item ✅ successfully on 0767861


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

@dgrammatiko
Copy link
Contributor

RTC

@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Aug 26, 2016
@brianteeman brianteeman added this to the Joomla 3.6.3 milestone Aug 26, 2016
@wilsonge wilsonge merged commit 72738eb into joomla:staging Aug 26, 2016
@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Aug 26, 2016
roland-d pushed a commit to roland-d/joomla-cms that referenced this pull request Sep 11, 2016
* Refactor category controller

* Remove errorneous check on component asset
roland-d added a commit to roland-d/joomla-cms that referenced this pull request Sep 11, 2016
…areable-draft-content

* origin/shareable-draft-content: (245 commits)
  Implement shareable draft links
  Cleaned up shared drafts view Added front-end token generarion
  Implement shared drafts view
  Remove obsolete file
  use only root (joomla#11703)
  com_search category results not displaying date (joomla#11802)
  warnings and errors, not notices ... (joomla#11801)
  [installation] Add javascript message titles and ajax errors strings (joomla#11800)
  Regression: Normalising head links and correcting hreflang for menu items associations (joomla#11769)
  Refactor allowEdit of backend category controller (joomla#11547)
  [com_contact] Move event trigger to correct place (joomla#11719)
  Improve the accessibility of the top menu in ISIS part 2 (joomla#11729)
  Show file extension (joomla#11776)
  change button -> a for the modal close button (joomla#11787)
  Small Grammar change (joomla#11788)
  Change message type to error when download of update package fails (joomla#11791)
  these are warnings not messages ... (joomla#11799)
  [plg_content_vote|pagebreak] Load language files only when needed (joomla#11730)
  [plg_system_stats] Load plugin language files only when needed (joomla#11728)
  Fix creation performance of form element menuparent, (slow down in menu item edit form, for item that belongs to large menu) (joomla#11628)
  ...

# Conflicts:
#	administrator/components/com_admin/script.php
#	administrator/components/com_content/models/shared.php
#	administrator/components/com_content/views/shared/tmpl/default.php
#	administrator/language/en-GB/en-GB.xml
#	administrator/language/en-GB/install.xml
#	administrator/manifests/files/joomla.xml
#	administrator/manifests/packages/pkg_en-GB.xml
#	installation/language/en-GB/en-GB.xml
#	language/en-GB/en-GB.xml
#	language/en-GB/install.xml
#	libraries/cms/pagination/pagination.php
#	libraries/cms/version/version.php
#	libraries/joomla/authentication/authentication.php
#	libraries/joomla/form/fields/color.php
#	libraries/joomla/form/fields/email.php
#	media/system/js/share-uncompressed.js
#	media/system/js/share.js
#	plugins/content/vote/vote.php
roland-d added a commit to roland-d/joomla-cms that referenced this pull request Sep 11, 2016
…areable-draft-content

* origin/shareable-draft-content: (253 commits)
  Fixed conflict
  Added menu item
  Code cleanup
  Implement shareable draft links
  Cleaned up shared drafts view Added front-end token generarion
  Implement shared drafts view
  Remove obsolete file
  use only root (joomla#11703)
  com_search category results not displaying date (joomla#11802)
  warnings and errors, not notices ... (joomla#11801)
  [installation] Add javascript message titles and ajax errors strings (joomla#11800)
  Regression: Normalising head links and correcting hreflang for menu items associations (joomla#11769)
  Refactor allowEdit of backend category controller (joomla#11547)
  [com_contact] Move event trigger to correct place (joomla#11719)
  Improve the accessibility of the top menu in ISIS part 2 (joomla#11729)
  Show file extension (joomla#11776)
  change button -> a for the modal close button (joomla#11787)
  Small Grammar change (joomla#11788)
  Change message type to error when download of update package fails (joomla#11791)
  these are warnings not messages ... (joomla#11799)
  ...

# Conflicts:
#	administrator/components/com_admin/script.php
#	administrator/components/com_content/controllers/article.php
#	administrator/components/com_content/controllers/articles.php
#	administrator/components/com_content/models/forms/article.xml
#	administrator/components/com_content/views/article/view.html.php
#	administrator/components/com_content/views/articles/view.html.php
#	components/com_content/views/form/tmpl/edit.php
#	libraries/cms/pagination/pagination.php
#	libraries/joomla/form/fields/email.php
#	plugins/content/vote/vote.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants