Advanced Search for admins only

7 views
Skip to first unread message

jo...@applieddefense.com

unread,
May 12, 2017, 1:13:19 PM5/12/17
to
On the search page, I would like to make the Advanced Search tab only available to people in the admin group.

I have looked through the code and templates and cannot figure out a straight forward way to limit the access to the Advanced Search tab.

Any help would be appreciated.

jo...@applieddefense.com

unread,
May 22, 2017, 4:05:55 PM5/22/17
to
I have resolved this one myself finally.
I made the following change to the search/tabs.html.tmpl file
[% IF user.in_group("admin") %]
[% tabs = [ { name => 'specific', label => "Simple Search",
link => "query.cgi?format=specific" },
{ name => 'advanced', label => "Advanced Search",
link => "query.cgi?format=advanced" } ] %]
[% ELSE %]
[% tabs = [ { name => 'specific', label => "Simple Search",
link => "query.cgi?format=specific" } ] %]
[% END %]
Reply all
Reply to author
Forward
0 new messages