On my find form the colum 'Betaald_NLE' should only be viewable by 1 role 'Boss'
So I made the next function:
- Code: Select all
function Betaald_NLE__permissions(&$record)
{
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
$role = $user->val('Role');
if ($role == "Boss")
{
return array('find' => 1);
exit;
}
else
{
return array('find' => 0);
exit;
}
}
But this doesn't work. Everybody can view and fill in the pull down and find records.
In fields..ini I have:
[Betaald_NLE]
group=Status_info
widget:type = select
vocabulary = Betaald_NLE_Vocabulary
visibility:list = hidden
visibility:browse = hidden
Could somebody please help me?
PolderBoy.