Achievo/Howto/Menu/Tabs/hide a tab
From Achievo/ATK Wiki
|
Achievo Howto: Achievo/Howto/Menu/Tabs/hide a tab
|
Sometimes you have tabs that only some members may see and edit. Some other members may not edit and also not see that tab. For example in projects the planning tab. In this howto I will explain how you will do this.
First open the file: class.project.inc
Go to line 87. This is the code you need to see.
$this->add(new atkOneToManyRelation("members","project.project_personemployee", "projectid", AF_HIDE_LIST|AF_CASCADE_DELETE), "planning");
Now you have find the code, replace that with:
$this->add(new atkOneToManyRelation("members","project.project_personemployee", "projectid", AF_HIDE_LIST|AF_HIDE_VIEW|AF_CASCADE_DELETE), "planning");
It is the part |AF_HIDE_VIEW| that hides it from the members and shows it only to the security profiles that have Edit rights.
Notes
Important: If you give an users rights to edit he/she can see the tab and edit it!