[wp-trac] [WordPress Trac] #34521: Unifying permission error messages
WordPress Trac
noreply at wordpress.org
Thu Jul 7 13:04:43 UTC 2016
#34521: Unifying permission error messages
--------------------------------------+-----------------------
Reporter: ramiy | Owner: ocean90
Type: enhancement | Status: reopened
Priority: normal | Milestone: 4.6
Component: Text Changes | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch | Focuses:
--------------------------------------+-----------------------
Changes (by ramiy):
* status: closed => reopened
* resolution: fixed =>
Comment:
Thank for the review @ocean90, I have a few notes:
=== Imports / Exports ===
For "imports" we are using "'''Sorry, you are not allowed to import
content.'''"
This is why the "export" should use "'''Sorry, you are not allowed to
export content.'''"
Patch: [attachment:34521-text-change-export.patch]
=== Manage Users ===
The `blogger_getUserInfo()` function in `wp-includes/class-wp-xmlrpc-
server.php` is checking for user permission using `current_user_can()`
function. The patch [attachment:34521-text-change-manage-users.2.patch] is
fixing the permission error message using the new standard - "you are not
allowed to...".
replacing "'''Sorry, you do not have access to user data on this site.'''"
with this "'''Sorry, you are not allowed to access user data on this
site.'''"
Looks like a minor change, but it's what ticket is meant to do - minor
changes all over the core.
=== API Permissions ===
As mentioned in the second comment, we replaced all the string saying:
* You don't have permission to ...
* You do not have permission to ...
* You do not have sufficient permissions to ...
The rest-api is the last string using the old format.
[attachment:34521-one-more-permission-string.patch] is updating this
string. The patch replacing the text and merging the string with other
similar string - "'''Sorry, you are not allowed to do that.'''", it is
used twice in `wp-includes/script-loader.php`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/34521#comment:50>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list