-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow the admin to indicate that task can modify its input in a ToolConfig #1054
Comments
The code that makes the check is in the tasks_controller.rb # Filter list of files as provided by the get request
file_ids = params[:file_ids] || []
access = @task.class.properties[:readonly_input_files] ? :read : :write
@files = Userfile.find_accessible_by_user(file_ids, current_user, :access_requested => access) rescue []
if @files.empty?
flash[:error] = "You must select at least one file to which you have write access."
redirect_to :controller => :userfiles, :action => :index
return
end |
If the checkbox is not set in the tool config (which should be default), then the value of the task integration code is used, as normal, which can mean yes or no. |
Make sure the migration sets a default value to 'false' in the table. |
Tool config data immutability flag resolves #1054
Right now the CBRAIN task launching interface will refuse to launch a task when:
group_writable
attribute is set toread-only
The behavior of point 3 is the default. A task can inform the framework that it doesn't modify its inputs by having either:
task_properties :readonly_input_files
inportal/taskname.rb
(standard integration)"custom": { "cbrain:readonly-input-files": true }
(Boutiques integration)Given that often integrators forget to set these properties, the admin should have the ability to override the behavior directly in a ToolConfig (or maybe directly at the Tool level?). This would be provided by a simply checkbox in the ToolConfig form, associated with a new boolean attribute:
The text was updated successfully, but these errors were encountered: