Support » Plugins » Media Library: Restricting users to see their pictures only

  • Resolved wsbo

    (@wsbo)


    How can I restrict users to see their own pictures only? The media library shows everyone’s pictures when they are adding or editing a post.

    Is there a plug-in or hack for this situation?

    I need to fix this before launching my community.

    Thank you in advance!

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter wsbo

    (@wsbo)

    The solution was installing this plugin http://wordpress.org/extend/plugins/custom-upload-dir/, setting up the default folder as the author, and removing the media library access from the upload window (media-upload.php)

    I would like to do this, but how do you “remove the media library access from the upload window”? I got as far as installing and activating the plugin, but I have no idea how to do the last part of the instructions.

    Thanks in advance!

    Neil Sunset

    (@neilsunset)

    Hello everyone. You can put this code into your theme’s (not actual WordPress’) function.php file.

    //Remove Media Library Tab
        function remove_medialibrary_tab($tabs) {
        	if ( !current_user_can( 'administrator' ) ) {
        		unset($tabs['library']);
        		return $tabs;
        	}
        	else
        	{
        		return $tabs;
            }
        }
        add_filter('media_upload_tabs','remove_medialibrary_tab');

    It says if the current user is not an administrator, then remove the Media Library tab from the Upload/Insert Media’s popup page that appears when adding media to a post. Otherwise if the user DOES have a role as admin, then they will still see all the tabs (File, URL, Media Library)

    role scoper does this perfectly, unfortunately it also a lot of other permission based things that I don’t need.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Media Library: Restricting users to see their pictures only’ is closed to new replies.