Page 1 of 1

Filter tab only for admin

Posted: 10 May 2014, 14:06
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.

Re: Filter tab only for admin

Posted: 10 May 2014, 17:22
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.

Re: Filter tab only for admin

Posted: 10 May 2014, 17:50
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?

Re: Filter tab only for admin

Posted: 10 May 2014, 18:25
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

Re: Filter tab only for admin

Posted: 11 May 2014, 09:05
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;}' );
     }
 }