User tests: Successful: Unsuccessful:
Pull Request for Improvement.
Replace com_banners exisiting 404 JError for a 403 php exception when the user does not have access to "Access Administration Interface" (core.manage).
If this change is ok i can do it for the other components that uses JError here.
Category | ⇒ | Administration Components |
Status | New | ⇒ | Pending |
Labels |
Added:
?
|
Title |
|
yes i would prefer to, but can you hint on how to add a specific exception like NotAllowedException
?
Well, if there isn't something in the standard SPL exceptions, just add a custom class like we have in the database API.
hum, doesn't seem to be any http://php.net/manual/en/spl.exceptions.php
I have tested this item
I have tested this item
I have tested this item
Status | Pending | ⇒ | Ready to Commit |
RTC please
Labels |
Added:
?
|
Status | Ready to Commit | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2016-08-14 16:00:56 |
Closed_By | ⇒ | rdeutz |
Labels |
Removed:
?
|
I would like to see a nicer error message, this one looks very technical. I also think to have some custom exceptions would be great. Merging it anyway because this is the way to go
what about:
You are not allowed to access this resource. Please contact your website administrator in order to get access to this resource.
or
You are not allowed to access this resource. Your website administrator can give you access to this resource just changing permissions.
people that is a language change nothing to do with this PR which porpose is to change the error to an exception.
Please make a PR for changing JERROR_ALERTNOAUTHOR
if you feel the need.
I'd prefer a more specific Exception class but +1 on the idea.