-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adds function for hidding admin tools in toolbox
- Loading branch information
1 parent
31bfc27
commit 45eaa81
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import logging | ||
log = logging.getLogger( __name__ ) | ||
|
||
def restrict_testing_tools_to_admins( context, tool ): | ||
""" | ||
This tool filter will hide the upload tool from all users except admin | ||
users. This can be enabled by renaming this file to examples.py and adding | ||
the following to the ``app:main`` section of ``galaxy.ini``: | ||
tool_filters = examples:restrict_testing_tools_to_admins | ||
""" | ||
if tool.id == "testing_html" or tool.id == "testing_pbs" or tool.id == "testing": | ||
return context.trans.user_is_admin | ||
return True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -239,6 +239,8 @@ galaxy_config: | |
sanitize_allowlist_file: "{{ galaxy_mutable_config_dir }}/sanitize_allowlist.txt" | ||
# This allows to do custom ordering of tools in sections, default was true, but Petr Novak wants specific orderring of tools | ||
toolbox_auto_sort: false | ||
# This hide specified tools for non-admin users | ||
tool_filters: 'examples:restrict_testing_tools_to_admins' | ||
smtp_server: "rs.cesnet.cz:25" | ||
error_email_to: "[email protected]" | ||
email_from: "[email protected]" | ||
|
@@ -367,6 +369,8 @@ galaxy_config_files: | |
# dest: "{{ galaxy_config.galaxy.themes_config_file }}" | ||
- src: files/galaxy/config/tpv_rules_local.yml | ||
dest: "{{ tpv_mutable_dir }}/tpv_rules_local.yml" | ||
- src: files/galaxy/lib/examples.py | ||
dest: "{{ galaxy_server_dir }}/lib/galaxy/tool_util/toolbox/filters/examples.py" | ||
|
||
galaxy_config_templates: | ||
- src: templates/galaxy/config/auth_conf.xml.j2 | ||
|