mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-25 00:12:08 +08:00
Require admin for new import_tools function in workflows API.
Includes test case.
This commit is contained in:
@@ -503,6 +503,9 @@ class WorkflowsAPIController(BaseAPIController, UsesStoredWorkflowMixin, UsesAnn
|
||||
data = payload['workflow']
|
||||
|
||||
import_tools = util.string_as_bool( payload.get( "import_tools", False ) )
|
||||
if import_tools and not trans.user_is_admin():
|
||||
raise exceptions.AdminRequiredException()
|
||||
|
||||
publish = util.string_as_bool( payload.get( "publish", False ) )
|
||||
# If 'publish' set, default to importable.
|
||||
importable = util.string_as_bool( payload.get( "importable", publish ) )
|
||||
|
||||
Reference in New Issue
Block a user