? Pending

User tests: Successful: Unsuccessful:

avatar andrepereiradasilva
andrepereiradasilva
14 Aug 2016

Pull Request for Improvement.

Summary of Changes

This PR is the sequence of #11593.

Replace all remaining administrator components existing 404 JError for a 403 php exception (JAccessExceptionNotallowed) when the user does not have access to "Access Administration Interface" (core.manage).

Before

image

After

image

Testing Instructions

  • Use latest staging
  • Apply patch
  • Create a user and add it to "Manager" group
  • Go to to all components and set "Access Administration Interface" (core.manage) to "Denied" for "Manager" group in all remaning components (com_content, com_banners, com_contact, com_media, com_newsfeeds, com_search and com_finder)
  • Try to access the following URL, you should see 403 errors now:
/administrator/index.php?option=com_banners
/administrator/index.php?option=com_cache
/administrator/index.php?option=com_categories
/administrator/index.php?option=com_categories&extention=com_content
/administrator/index.php?option=com_checkin
/administrator/index.php?option=com_contact
/administrator/index.php?option=com_content
/administrator/index.php?option=com_contenthistory&view=history (this one will give a layout not definied error)
/administrator/index.php?option=com_finder
/administrator/index.php?option=com_installer
/administrator/index.php?option=com_joomlaupdate
/administrator/index.php?option=com_languages
/administrator/index.php?option=com_media
/administrator/index.php?option=com_menus
/administrator/index.php?option=com_messages
/administrator/index.php?option=com_modules
/administrator/index.php?option=com_newsfeeds
/administrator/index.php?option=com_plugins
/administrator/index.php?option=com_redirect
/administrator/index.php?option=com_search
/administrator/index.php?option=com_tags
/administrator/index.php?option=com_templates
/administrator/index.php?option=com_users
  • Code review.

Note the other admin components (com_admin, com_ajax, com_cpanel, com_postinstall) doesn't use this or already use exceptions.

Didn't touch com_config. This one needs another PR.

Documentation Changes Required

None.

avatar joomla-cms-bot joomla-cms-bot - change - 14 Aug 2016
Category Administration Components Media Manager Tags
avatar andrepereiradasilva andrepereiradasilva - open - 14 Aug 2016
avatar andrepereiradasilva andrepereiradasilva - change - 14 Aug 2016
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 14 Aug 2016
Labels Added: ?
avatar wilsonge
wilsonge - comment - 15 Aug 2016

OK so I'm going to be super nasty about this. I think this needs a different exception class - this is not an exception thrown in the controller therefore in my opinion JControllerExceptionNotallowed is the wrong exception to be used here

avatar andrepereiradasilva
andrepereiradasilva - comment - 15 Aug 2016

ok. i understand, so what do you recomend then?

avatar andrepereiradasilva
andrepereiradasilva - comment - 15 Aug 2016

Add a new JAccessExceptionNotallowed exception?

avatar wilsonge
wilsonge - comment - 15 Aug 2016

I think so - and thinking about it maybe extend the controller exception from that?

avatar joomla-cms-bot joomla-cms-bot - change - 15 Aug 2016
Category Administration Components Media Manager Tags Administration Components Media Manager Tags Libraries
avatar andrepereiradasilva andrepereiradasilva - change - 15 Aug 2016
The description was changed
avatar andrepereiradasilva andrepereiradasilva - edited - 15 Aug 2016
avatar andrepereiradasilva andrepereiradasilva - edited - 15 Aug 2016
avatar andrepereiradasilva
andrepereiradasilva - comment - 15 Aug 2016

ok done.

Removed the JControllerExceptionNotAllowed since it doesn't make sense now (it was added yesterday so no B/C break)

avatar jeckodevelopment jeckodevelopment - test_item - 15 Aug 2016 - Tested successfully
avatar jeckodevelopment
jeckodevelopment - comment - 15 Aug 2016

I have tested this item successfully on bb75a88


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

avatar jeckodevelopment
jeckodevelopment - comment - 15 Aug 2016

Works as expected.

11608

avatar wilsonge wilsonge - close - 15 Aug 2016
avatar wilsonge wilsonge - merge - 15 Aug 2016
avatar wilsonge wilsonge - change - 15 Aug 2016
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2016-08-15 22:42:25
Closed_By wilsonge

Add a Comment

Login with GitHub to post a comment