Very, very useful extension. Thanks a LOT! I hope you don’t mind, but I also wanted the permissions to work the other way around (as per Mark’s request) and have come up with following tweak for those that are interested until you have time to make a full update. Change at line 257 of ext.restrict_entries.php fromtoforeach($SESS->cache['restricted_member_group_data']->result AS $key) { if ($key['entry_id'] == $row['entry_id']) { $groups = unserialize($key['member_groups']); foreach($groups AS $key => $value) { if($SESS->userdata['group_id'] == $value) { $tagdata = ''; break; } } } }
Also change line 12 of lang.restrict_entries.php fromforeach($SESS->cache['restricted_member_group_data']->result AS $key) { if ($key['entry_id'] == $row['entry_id']) { $groups = unserialize($key['member_groups']); $ok=FALSE; foreach($groups AS $key => $value) { if($SESS->userdata['group_id'] == $value) { $ok=TRUE; break; } } if ($ok===FALSE && $SESS->userdata['group_id']!=1){ $tagdata = ''; } } }
to"Select the groups that you wish to prevent from viewing this entry",
Super-Admins will always get to see everything."Select the groups that you wish to allow to view this entry",
I just revisited this thread today and tried this update but I can’t get it to work around the other way. In fact placing this code in doesn’t do anything now. Instead of the check-boxes actually doing anything, now no matter if I choose a checkbox or don’t the entries just show to everyone regardless.
Has anyone any ideas on this as I do have a need for this now and would really need it to work around the other way.
Greg any ideas at all?
Thanks.
Best wishes,
Mark
Hello Greg,
I found this excellent extension thanks to the ever-helpful Mark Bowen. I have two issues however - is the extension MSM compatible? And also there seems to be a conflict with Leevi’s NSM Publish Plus on the Edit screen - the Restricted Entries table column seems to hide the Workflow State column (with the coloured circles showing entry states).
Many thanks, Jordan
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.