[wpmu-trac] [WordPress MU Trac] #1093: Post/page author dropdown field not displayed on edit post/page screen for site admins
WordPress MU Trac
wpmu-trac at lists.automattic.com
Fri Aug 21 04:41:06 UTC 2009
#1093: Post/page author dropdown field not displayed on edit post/page screen for
site admins
--------------------------+-------------------------------------------------
Reporter: jamescollins | Owner: somebody
Type: defect | Status: new
Priority: normal | Milestone:
Component: component1 | Version:
Severity: normal | Keywords:
--------------------------+-------------------------------------------------
In WPMU 2.8.4a (and possibly earlier versions), when logged in as a site
admin to a blog that they aren't explicitly an administrator for, there is
no "Post Author" dropdown field on the Edit Post or Edit Page screens.
Steps to replicate:
1. Login as a site admin to a blog that was created by another user (ie
there is no wp_x_capabilities usermeta record for the site admin) for the
corresponding blog id.
2. Edit an exiting post or page.
3. No "Post Author" or "Page Author" dropdown box is available, and there
is no "Post Author" or "Page Author" option in the screen options section
either.
The problem is in the {{{get_editable_user_ids()}}} function in wp-
admin/includes/user.php because the site admin doesn't have the
{{{edit_others_posts}}}/{{{edit_others_pages}}} capability because the
site admin doesn't actually have an administrator role.
This results in an empty array being returned, which means that the author
dropdown isn't displayed.
In [1583], an {{{is_site_admin()}}} check was added to the
{{{current_user_can()}}} function. Perhaps a similar check needs to be
added to the {{{WP_User::has_cap()}}} function?
--
Ticket URL: <http://trac.mu.wordpress.org/ticket/1093>
WordPress MU Trac <http://mu.wordpress.org/>
WordPress Multiuser
More information about the wpmu-trac
mailing list