restrict access to fields depending on the user or type

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
onoboa
User
Posts: 86
Location: Guayaquil - Ecuador

restrict access to fields depending on the user or type

Post by onoboa »

1.- I have a table in which information is saved by 3 different people, what I need is that each user can only use the fields that correspond to him and not edit information of the other user.

How can I restrict access to fields depending on the user or type of user?

2.- Given the above, as I can in the menu make 3 instances of the same table, but each of the instances has a different filter Ex:

Case 1:

Permission table

The employee fills information in a permit application.

Case 2:

Permission table

The immediate boss approves the requested permission and saves the user, date and time of approval.

Case 3:

Permit table and holiday table

The HR department approves the request of the employee previously approved by his immediate boss, keeping user, date and time of the approval and sends that information in a second table.

Greetings and thanks,


hemin
User
Posts: 165

Post by hemin »

you can hide the field in add/edit for instance, put below code in page_load add/ edit
if (CurrentUserLevel() == 2 )
{ $this->FieldName->Visible = FALSE; }


hemin
User
Posts: 165

Post by hemin »

or use the below to make it readonly
$this->FieldName->ReadOnly = TRUE;


onoboa
User
Posts: 86
Location: Guayaquil - Ecuador

Post by onoboa »

Thanks for your help.


Post Reply