fieldname permissions

A place for users and developers of the Xataface to discuss and receive support.

fieldname permissions

Postby samhans » 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
samhans
 
Posts: 96
Joined: Fri Feb 10, 2012 1:22 am

Re: fieldname permissions

Postby Jean » Wed Feb 22, 2012 2:18 am

Hi,
Are you sure it is
Code: Select all
$user->val('Role');
and not
Code: Select all
$user->val('role');


Jean
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France

Re: fieldname permissions

Postby samhans » Wed Feb 22, 2012 3:07 am

hai jean ,
definitely it is Role.
samhans
 
Posts: 96
Joined: Fri Feb 10, 2012 1:22 am

Re: fieldname permissions

Postby Jean » Wed Feb 22, 2012 6:23 am

Try
Code: Select all
return Dataface_PermissionsTool::getRolePermissions('READ ONLY');
Jean
 
Posts: 259
Joined: Wed Nov 07, 2007 1:30 am
Location: Pau, France


Return to Xataface Users

Who is online

Users browsing this forum: No registered users and 10 guests

cron
Powered by Dataface
© 2005-2007 Steve Hannah All rights reserved