Page 1 of 1

fieldname permissions problem

PostPosted: Fri Feb 17, 2012 10:47 pm
by samhans
hai,
i am setting permissions to field name approver with the following code
function approver__permissions(&$record){
$the_user =$this->getUser($record);
$user=$the_user->val('identifiant');
if ( !$user) return Dataface_PermissionsTool::NO_ACCESS();

if ( $user=='approver' ){
return Dataface_PermissionsTool::ALL();
} elseif ($user=='admin'){
return Dataface_PermissionsTool::ALL();
}
else {
return Dataface_PermissionsTool::READ_ONLY();
}
}


after this the filed disappears from the form.
please help

Re: fieldname permissions problem

PostPosted: Sun Feb 19, 2012 9:45 am
by shannah
Probably you're giving the field no access permissions. Check your rules and make sure they're doing what you intend.

Re: fieldname permissions problem

PostPosted: Sun Feb 19, 2012 10:01 am
by samhans
thanks Steve . i have set no access.
now i have made it read only. every thing runs fine.


thanks again