| User | Post |
|
5:14 am September 29, 2008
| Daisy
Member
| | | |
|
| posts 35 |
|
|
I've been having a problem with Role Scoper limiting the ability for Editor and Contributor users to preview posts. Since admins were able to preview posts I used the Role Manager plugin to attempt to issolate the role that makes it possible to preview.
Strangely the role that enables this is "activate plugins" I certainly don't want my editors and contributors having access to this portion of the site!
Any thoughts on this problem? The message recieved when a user without the activate plugins role attempts to preview an unpublished post is:
"Sorry, no posts matched your criteria."
|
|
|
8:39 am September 29, 2008
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
Thanks for reporting this bug. I have corrected the code for the upcoming release. Until then, please modify plugins/role-scoper/defaults_rs.php as follows:
add:
if ( ! empty($_GET['preview']) ) { $arr[$name]->reqd_caps['read']['post'] = array ( 'draft' => array('edit_others_posts'), 'pending' => array('edit_others_posts'), 'future' => array('edit_others_posts') ); $arr[$name]->reqd_caps['read']['page'] = array ( 'draft' => array('edit_others_pages'), 'pending' => array('edit_others_pages'), 'future' => array('edit_others_pages') ); }
just before:
/* Post data source and others following the "save_{src_name}", etc. pattern
Previously (due to this bug), only administrators could preview posts. Role Scoper defines an administrator as any user with the activate_plugins capability — if you can activate plugins, you can do anything 
|
|
|
11:37 am September 29, 2008
| Daisy
Member
| | | |
|
| posts 35 |
|
|
What a lifesaving fix! Thanks.
|
|
|
2:39 pm September 29, 2008
| Daisy
Member
| | | |
|
| posts 35 |
|
|
I tried the fix and it does not seem to have helped. Both contributor and editor are unable to view the preview.
I have exlusive section rules applied and a group set to be editor and a group set to be contributor for a single category.
Is it possible that I have something set incorrectly? I really need this to work!! LOL
|
|
|
10:45 pm September 29, 2008
| Kevin
Admin
| | | |
|
| posts 2503 |
|
|
The code snippet I quoted in the previous post was missing one line. Here is the updated patch:
if ( ! empty($_GET['preview']) ) { $arr['post']->usage->statuses->access_type['front'] = array( 'draft', 'pending', 'future' ) + $arr['post']->usage->statuses->access_type['front']; $arr['post']->reqd_caps['read']['post'] = array ( 'draft' => array('edit_others_posts'), 'pending' => array('edit_others_posts'), 'future' => array('edit_others_posts') ) + $arr['post']->reqd_caps['read']['post']; $arr['post']->reqd_caps['read']['page'] = array ( 'draft' => array('edit_others_pages'), 'pending' => array('edit_others_pages'), 'future' => array('edit_others_pages') ) + $arr['post']->reqd_caps['read']['page']; }
just before:
/* Post data source and others following the "save_{src_name}", etc. pattern
|
|
|
6:02 am September 30, 2008
| Daisy
Member
| | | |
|
| posts 35 |
|
|
This appears to have worked. Thanks so much for your work!
|
|