Change WordPress user roles and capabilities › Forums › How to or FAQ › Shared Media-Uploads
- This topic has 13 replies, 2 voices, and was last updated 9 years, 5 months ago by roteskreuz-innsbruck.
-
AuthorPosts
-
28/06/2015 at 10:17 #1560roteskreuz-innsbruckParticipant
Hey,
I gave my Subscriber Role the ability to edit pages, by assigning just 2 page-ids to this role.
The only thing I also need is a shared media-library. So I want him to see all existing uploads and files.
I did already check “Upload Files” for the subscriber role, but that doen’s show the media uploads for the subscriber role.
How can I do that?
28/06/2015 at 14:51 #1561roteskreuz-innsbruckParticipantI also want the Subscriber to be able to edit those pages, not only view them. What do I have to set?
29/06/2015 at 07:38 #1562VladimirKeymasterThis is a default behavior of User Role Editor: user with editing posts/pages restrictions sees only those media library items, which he uploaded himself.
29/06/2015 at 08:13 #1563roteskreuz-innsbruckParticipantOk, is there some setting I can set? Or any “hack” or function i can set in the functions.php file? This would be really important for me.
29/06/2015 at 09:28 #1564roteskreuz-innsbruckParticipantI upgraded to the payed version of the plugin, but I really need this functionality. Thank you in advance.
30/06/2015 at 06:02 #1565VladimirKeymasterI added special filter to the development version 4.19.b17. Try it. Add this code to the active theme functions.php to set this filter:
add_filter('ure_attachments_show_full_list', 'show_attachments_full_list', 10, 1); function show_attachments_full_list($show_full_list) { return true; }
It allows to show full Media Library items list for the restricted users.
30/06/2015 at 06:53 #1566roteskreuz-innsbruckParticipantDear Vladimir,
thank you, but unfortunately this does not work for me. Neither does this …
add_action( 'admin_init', 'rk_shared_uploads' ); add_action( 'init', 'rk_shared_uploads'); function rk_shared_uploads() { $subscriber = get_role( 'subscriber' ); $subscriber->add_cap( 'upload_files' ); $subscriber->add_cap( 'unfiltered_upload' ); $contributor = get_role( 'contributor' ); $contributor->add_cap( 'upload_files' ); $contributor->add_cap( 'unfiltered_upload' ); $author = get_role( 'author' ); $author->add_cap( 'upload_files' ); $author->add_cap( 'unfiltered_upload' ); }
that I have tested.
I have a subscriber that has the ability to edit and update 3 pages. It is also possible for him to “upload new media”, but if I click on Media-Overview in the backend it says “No Media found”
Any further ideas?
30/06/2015 at 13:24 #1567VladimirKeymasterWhat version of URE Pro do you use? Is it 4.19.b17?
30/06/2015 at 13:52 #1568roteskreuz-innsbruckParticipantVersion 4.18.5
30/06/2015 at 14:02 #1569VladimirKeymasterMy recommendation above (about adding special filter to the active theme’s functions.php file) works for the development version 4.19.b17 only. You may download it after login from download page. Use “Download” link under “Development version available” title.
30/06/2015 at 15:06 #1570roteskreuz-innsbruckParticipantThanks, now I have the latest version … http://cloud.florianmatthias.com/boym
but still no luck …
I have a subscriber with this caps enabled … http://cloud.florianmatthias.com/bpOT… and I have your function in the functsion.php file.
However I log in under this user I can edit and update the 3 pages, but when clicking on media I get this … http://cloud.florianmatthias.com/bp5J (which is german for no media available)
30/06/2015 at 18:27 #1571VladimirKeymasterI re-checked with your role copy and got a needed result with full list of Media Library items.
If that’s possible you may send me admin credentials to check your settings on-line (support [at-sign] role-editor.com).01/07/2015 at 04:59 #1572VladimirKeymasterIn general, ‘upload_files’ is enough to see all items of the ‘Media Library’ and may add a new one.
I deactivated URE at your site temporally and ‘subscriber’ role still did not see Media Library items. This showed that some other plugin or even theme blocks access to the media library items. After some testing I discovered that your site current setup requires at least the ‘manage_options’ capability to be included into the ‘subscriber’ role in order it has access to media library items uploaded by others.
So I added ‘manage_options’ to the ‘subscriber’ role and blocked all extra menu items with ‘Admin menu’ add-on. Please check.02/07/2015 at 06:40 #1575roteskreuz-innsbruckParticipantThank you very much.
-
AuthorPosts
- You must be logged in to reply to this topic.