[wp-trac] [WordPress Trac] #14060: Misleading "You do not have sufficient permissions to access this page."

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 5 08:05:59 UTC 2010


#14060: Misleading "You do not have sufficient permissions to access this page."
---------------------------+------------------------------------------------
 Reporter:  hakre          |       Owner:                 
     Type:  defect (bug)   |      Status:  new            
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Accessibility  |     Version:  3.0            
 Severity:  normal         |    Keywords:  needs-patch    
---------------------------+------------------------------------------------
Changes (by dd32):

  * keywords:  has-patch => needs-patch


Comment:

 Both of those proposed wordings are not appropriate IMO.

 The major case of that block is to prevent users accessing pages which
 they do not have access to, The current wording seems appropriate for that
 (A straight up, Permission denied message).

 "The requested page is not accessible." - Doesn't convey the reason for
 the page being inaccessible.

 An alternate solution could be such as follows to give non-existant pages
 a specific error:
 {{{
 if ( !admin_page_exists() ) {
  do_action...
  wp_die "non-existant page!"
 } elseif ( !user_can_access_admin_page() ) {
  do_action...
  wp_die "You dont have access!...";
 }
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14060#comment:3>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list