Hiding tabs from clients [DEPRECATED IN activeCollab 1.1. AND LATER!]
Page: 1
Ilija Studen
on Oct 23. 2007. 8:13 am
Plugins add tabs to the navigation when on_project_tabs event is trggered. Every module (plugin) has a on_project_tabs handler located in /activecollab/application/modules/#MODULE_NAME#/handlers/on_project_tabs.php file. Here is how handler usually looks like:
If you wish to hide a certain type from your clients alter it too look like this:
Notice that we are asking from the system to tell us who the logged in user is and if we have a logged in user and he is a member of owner company that we are adding a new tab.
Tabs are added by the following modules:
- Discussions - /discussions
- Milestones - /milestones
- Files - /files
- Checklists - /checklists
- Calendar - /calendar
- Pages - /pages
- Tickets - /tickets
- Time - /timetracking
function calendar_handle_on_project_tabs(&$tabs, &$project) {
$tabs->add('calendar', array(
'text' => lang('Calendar'),
'url' => Calendar::getProjectCalendarUrl($project),
));
} // calendar_handle_on_project_tabsIf you wish to hide a certain type from your clients alter it too look like this:
function calendar_handle_on_project_tabs(&$tabs, &$project) {
$user = get_logged_user();
if(instance_of($user, 'User') && $user->isOwner()) {
$tabs->add('calendar', array(
'text' => lang('Calendar'),
'url' => Calendar::getProjectCalendarUrl($project),
));
} // if
} // calendar_handle_on_project_tabsNotice that we are asking from the system to tell us who the logged in user is and if we have a logged in user and he is a member of owner company that we are adding a new tab.
Tabs are added by the following modules:
- Discussions - /discussions
- Milestones - /milestones
- Files - /files
- Checklists - /checklists
- Calendar - /calendar
- Pages - /pages
- Tickets - /tickets
- Time - /timetracking
activeCollab team member
shailu_agrawal
on Dec 14. 2007. 9:32 pm
Don't we should have a feature such that if a client is not given permission for both "Time tracking add" and "Time tracking manage", Time tracking tab should remain hidden from the client. Most of the users of AC don't use all the the features of AC and it is very much required to keep the only required tabs to make it less confusing.
cbtrussell
on Dec 19. 2007. 7:22 pm
No - permissions and client visibility of aC functions are quite broken in the current release. All users on a project have view permission to everything. Even if you hide a tab, that content still appears on the dashboard, on the calendar, in linked modules, etc. See this post for details:
http://www.activecollab.com/forums/topic/2327/
http://www.activecollab.com/forums/topic/2327/
sccrwoohoo
on Feb 3. 2008. 11:45 am
I noticed when I tried this no matter what permission the user had, they could not see this tab at all. I even made the use the project leader without any success. Is there a way to set this so that if the user has permissions they would see the tab?
sccrwoohoo:I noticed when I tried this no matter what permission the user had, they could not see this tab at all. I even made the use the project leader without any success. Is there a way to set this so that if the user has permissions they would see the tab?
yes indeed... so it would be a lot easier to explain to clients or new contractors how we work on AC
3mille.com | websemantique.com | virtuel-immobilier.com | flickr.com/photos/laurentsj/
Ilija Studen
on Aug 9. 2008. 11:03 am
This hack is considered deprecated for anyone using activeCollab 1.1 or later. Use project permissions and project roles instead!
activeCollab team member



