[wp-trac] [WordPress Trac] #14530: "Cheatin', uh?" is not helpful feedback for users or developers
WordPress Trac
noreply at wordpress.org
Thu Jan 15 05:40:16 UTC 2015
#14530: "Cheatin', uh?" is not helpful feedback for users or developers
-----------------------------+-----------------------
Reporter: shidouhikari | Owner:
Type: enhancement | Status: reopened
Priority: normal | Milestone: 4.2
Component: Role/Capability | Version:
Severity: normal | Resolution:
Keywords: needs-patch | Focuses: ui
-----------------------------+-----------------------
Comment (by rmccue):
Replying to [comment:39 helen]:
> I wonder if we could add a clearer error message underneath when
WP_DEBUG is on.
This is my exact thought, since we could handle this without losing the
personality here.
Something like...
{{{
if ( WP_DEBUG ) {
$message .= '<p>' . sprintf( __( "Psst, <code>%s</code> does not have
the <code>%s</code> capability." ), $user, $cap ) . '</p>';
}
}}}
Alternatively, we could also do it in a less specific way for all users:
{{{
$message .= '<p>' . __( "Psst, you don't have permission to access this
page." ) . '</p>';
}}}
I'm definitely -1 on showing the actual permission name though for non-
debug, as we don't expose these anywhere (roles are our user-facing
abstraction for these).
--
Ticket URL: <https://core.trac.wordpress.org/ticket/14530#comment:45>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list