Achievo/Howto/Menu/Tabs/hide a tab

From Achievo/ATK Wiki

Jump to: navigation, search

Achievo Howto: Achievo/Howto/Menu/Tabs/hide a tab

Complexity: Easy
Author: Klaaspeter

List of other Howto's

Achievo-logo.png


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!

See forum

Personal tools
Navigation