fieldname permissions problem

Archived from the Xataface Users forum.

samhans — Fri Feb 17, 2012 10:47 pm

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


shannah — Sun Feb 19, 2012 9:45 am

Probably you’re giving the field no access permissions. Check your rules and make sure they’re doing what you intend.


samhans — Sun Feb 19, 2012 10:01 am

thanks Steve . i have set no access.
now i have made it read only. every thing runs fine.

thanks again