Hide Company Tickets tab in Customer Portal based on Users Group Membership

From OtterHub - OTRS Community Wiki
Jump to: navigation, search

If you wish to restrict the Company Tickets tab in the Customer Portal to a select few, e.g. Managers, then here is recipe that works for v3 --ekovarski

In Config.pm, add the following:

   $Self->{CustomerGroupAlwaysGroups} = ['users'];
   $Self->{CustomerGroupSupport} = 1;
   $Self->{'CustomerFrontend::Module'}->{'CustomerTicketOverView'} = {
      'Title' => 'Overview',
      'Description' => 'Overview of customer tickets',
      'NavBarName' => 'Ticket',
      'NavBar' => [
                   {
                     'Description' => 'My Tickets',
                     'Name' => 'My Tickets',
                     'Link' => 'Action=CustomerTicketOverView;Subaction=MyTickets',
                     'Prio' => '110',
                     'AccessKey' => 'm'
                   },
                   {
                     'Group' => [ 'acl_CompanyTicketOverView' ],
                     'Description' => 'Company Tickets',
                     'Name' => 'Company Tickets',
                     'Link' => 'Action=CustomerTicketOverView;Subaction=CompanyTickets',
                     'Prio' => '120',
                     'AccessKey' => 'c'
                   }
      ],
   };

Now login as an administrator in OTRS, and create a group called 'acl_CompanyTicketOverView' in Admin -> Agent Management -> Groups.

Once the group is created, go to Admin -> Customer Management -> Customers <-> Groups. From Customers, select the user that you wish to have rights to view the Company Tickets tab and give them "RW" permissions to acl_CompanyTicketOverView.

If you find any errors in this, please correct the wiki entry so it doesn't get stale. Thank you!