Filter tab only for admin

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
Mejstro
Posts: 24
Joined: 07 May 2014, 12:07

Filter tab only for admin

Post by Mejstro »

Hi, I would like to ask you, if would be possible to limit access to the Filter table in the Bug page for admin only. For other users should be hidden. Thanks a lot for any answer.
atrol
Site Admin
Posts: 8589
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Filter tab only for admin

Post by atrol »

There is no configuration option for it.
You have to change function print_menu in file core/html_api.php if you want it.
Please use Search before posting and read the Manual
Mejstro
Posts: 24
Joined: 07 May 2014, 12:07

Re: Filter tab only for admin

Post by Mejstro »

Thanks a lot for your answer. Well...If there is no option to limit access, is there, at least, any possibility to minimize it by default?
atrol
Site Admin
Posts: 8589
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Filter tab only for admin

Post by atrol »

Mejstro wrote:any possibility to minimize it by default?
This is a known feature request.
I didn't check, maybe the mentioned custom functions does he job, see http://www.mantisbt.org/bugs/view.php?id=10636#c22959
Please use Search before posting and read the Manual
Mejstro
Posts: 24
Joined: 07 May 2014, 12:07

Re: Filter tab only for admin

Post by Mejstro »

Thank you veru much for your help....Now it works like a charm....
i found the new "simple" way to collapse filters (and the other sections, think you will get the idea)..
add the following code to the custom_functions_inc.php in mantis main dir (if the file does not exist-create it with '<?php' at the top):

Code: Select all

if (auth_is_user_authenticated()) {
     //collapse filters by default > work around
     if (token_get(TOKEN_COLLAPSE) == null) {
         token_set( TOKEN_COLLAPSE, 'a:1:{s:6:"filter";b:0;}' );
     }
 }
Post Reply