fieldname permissions
Posted: Tue Feb 21, 2012 11:27 pm
hai steve and all;
problem with fieldname permissions
function section__permissions(&$record){
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
$role = $user->val('Role');
if ($role == "ADMIN") return null;
if ($role == "APPROVER")return Dataface_PermissionsTool::ALL();
if ($role == "DEMANDE")return Dataface_PermissionsTool::READ_ONLY();
}
NOW THE PROBLEM IS THAT THE FIELD SECTION HAS NO CHANGE AND DEMANDE CAN ALSO EDIT THE FIELD.
WHEN I AM CHANGING TO NO_ACCESS() THEN THE FIELD DISAPPEARED FROM THE LIST AND THE FORM PAGE.
I WANT THAT APPROVER CAN EDIT THE FORM BUT DEMANDE CAN ONLY VIEW IT.
PLEASE HELP.
THANKS IN ADVANCE
problem with fieldname permissions
function section__permissions(&$record){
$auth =& Dataface_AuthenticationTool::getInstance();
$user =& $auth->getLoggedInUser();
$role = $user->val('Role');
if ($role == "ADMIN") return null;
if ($role == "APPROVER")return Dataface_PermissionsTool::ALL();
if ($role == "DEMANDE")return Dataface_PermissionsTool::READ_ONLY();
}
NOW THE PROBLEM IS THAT THE FIELD SECTION HAS NO CHANGE AND DEMANDE CAN ALSO EDIT THE FIELD.
WHEN I AM CHANGING TO NO_ACCESS() THEN THE FIELD DISAPPEARED FROM THE LIST AND THE FORM PAGE.
I WANT THAT APPROVER CAN EDIT THE FORM BUT DEMANDE CAN ONLY VIEW IT.
PLEASE HELP.
THANKS IN ADVANCE