Title: Author View
Last modified: March 1, 2018

---

# Author View

 *  [bdvirtue](https://wordpress.org/support/users/bdvirtue/)
 * (@bdvirtue)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/author-view/)
 * Plugin works great on my computer when I sign in as her I can only see files 
   uploaded as that user, but when I log into the site as her, from her computer,
   she can see all the files uploaded not just hers. We cleared some of the history,
   but still no luck. Any thoughts? Thanks
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fauthor-view%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Thread Starter [bdvirtue](https://wordpress.org/support/users/bdvirtue/)
 * (@bdvirtue)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/author-view/#post-10029908)
 * Now that I logged back in as her on my computer I stand corrected… I can see 
   all files not just the ones she uploaded. 🙁
 *  Thread Starter [bdvirtue](https://wordpress.org/support/users/bdvirtue/)
 * (@bdvirtue)
 * [8 years, 6 months ago](https://wordpress.org/support/topic/author-view/#post-10029944)
 * Sorry for all of the replies by me…
    I did figure something out. When media is
   in the icon view it is fine, it is when it is in list view that she can see every
   file uploaded to the site. Is there something I can do to correct this? Thanks
   again.
 *  [Hernan Villanueva](https://wordpress.org/support/users/chvillanuevap/)
 * (@chvillanuevap)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/author-view/#post-10088728)
 * This plugin uses a single function:
 *     ```
       add_filter( 'ajax_query_attachments_args', 'mrfx_show_current_user_attachments' );
   
       function mrfx_show_current_user_attachments( $query ) {
           $user_id = get_current_user_id();
           if ( $user_id && !current_user_can('administrator') && !current_user_can('editor') ) {
               $query['author'] = $user_id;
           }
           return $query;
       }
       ```
   
 * This filter works great for the grid mode, but not for the list mode. You will
   need the following for the list mode:
 *     ```
       add_filter( 'request', 'mrfx_show_current_user_attachments_list' );
       function mrfx_show_current_user_attachments_list( $query ) {
   
       	$screen = get_current_screen();
   
       	if ( in_array( $screen->id, array( 'upload' ) ) ) {
       		$user_id = get_current_user_id();
       		if ( $user_id && !current_user_can('administrator') && !current_user_can('editor') ) {
       			$query['author'] = $user_id;
       		}
       	}
       	return $query;
       }
       ```
   
 * I got the idea from Woothemes Sensei. They have the same functionality, but for
   their own Teacher role.

Viewing 3 replies - 1 through 3 (of 3 total)

 The topic ‘Author View’ is closed to new replies.

 * ![](https://ps.w.org/restrict-media-library-access/assets/icon-256x256.png?rev
   =1712173)
 * [Restrict Media Library Access](https://wordpress.org/plugins/restrict-media-library-access/)
 * [Support Threads](https://wordpress.org/support/plugin/restrict-media-library-access/)
 * [Active Topics](https://wordpress.org/support/plugin/restrict-media-library-access/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/restrict-media-library-access/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/restrict-media-library-access/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [Hernan Villanueva](https://wordpress.org/support/users/chvillanuevap/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/author-view/#post-10088728)
 * Status: not resolved