Login or Register

RSS IconRecent posts in this topic

avatar
Ilija Studen on Oct 23. 2007. 1:13 pm
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:

function calendar_handle_on_project_tabs(&$tabs, &$project) {
  $tabs->add('calendar', array(
    'text' => lang('Calendar'),
    'url' => Calendar::getProjectCalendarUrl($project),
  ));
} // calendar_handle_on_project_tabs


If 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_tabs


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
activeCollab team member
avatar
shailu_agrawal on Dec 15. 2007. 3:32 am
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.
avatar
cbtrussell on Dec 20. 2007. 1:22 am
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/
avatar
sccrwoohoo on Feb 3. 2008. 5:45 pm
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?


avatar
laurentsj on Aug 9. 2008. 2:34 pm
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/
avatar
Ilija Studen on Aug 9. 2008. 4:03 pm
This hack is considered deprecated for anyone using activeCollab 1.1 or later. Use project permissions and project roles instead!
activeCollab team member

RSS IconRecent posts in this topic