rackem
Well-Known Member
Several months ago, I had set up two of my lists with the CanEditRow Plugin. Sometime since then they stopped working and now when I go into the options, there is a new option called "Access". What is this for? There is no tooltip to describe it and the wiki was never updated. I have experimented with different settings but can't get this plugin to work again.
Attached is a picture of my settings and here is the Eval code I was using. The idea is that if a record is "owned", then you must either be the owner or a "power" user in order to edit record.
This code no longer seems to be working. My list access is set to registered. So any registered user is able to edit any of the records.
Attached is a picture of my settings and here is the Eval code I was using. The idea is that if a record is "owned", then you must either be the owner or a "power" user in order to edit record.
Code:
$user =& JFactory::getUser();
$me = $user->id;
$pwr = in_array(11,$user->getAuthorisedGroups());
$own = '{mps_players___owner_raw}';
if($pwr) return TRUE;
elseif($own <> 0 AND $own <> $me) return FALSE;
else return TRUE;
This code no longer seems to be working. My list access is set to registered. So any registered user is able to edit any of the records.