X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/f5764a05d616e8d3c55b94503d5a1f789ac66ea7..cf0171de6e0f875748cc80026c9ea8a11147c750:/services/api/app/models/arvados_model.rb diff --git a/services/api/app/models/arvados_model.rb b/services/api/app/models/arvados_model.rb index 8c8ad8e254..816dbf4758 100644 --- a/services/api/app/models/arvados_model.rb +++ b/services/api/app/models/arvados_model.rb @@ -422,7 +422,7 @@ class ArvadosModel < ApplicationRecord end def logged_attributes - attributes.except(*Rails.configuration.AuditLogs.UnloggedAttributes) + attributes.except(*Rails.configuration.AuditLogs.UnloggedAttributes.keys) end def self.full_text_searchable_columns @@ -457,6 +457,9 @@ class ArvadosModel < ApplicationRecord if not ft[:cond_out].any? return query end + ft[:joins].each do |t| + query = query.joins(t) + end query.where('(' + ft[:cond_out].join(') AND (') + ')', *ft[:param_out]) end @@ -735,6 +738,14 @@ class ArvadosModel < ApplicationRecord end end + def ensure_filesystem_compatible_name + if name == "." || name == ".." + errors.add(:name, "cannot be '.' or '..'") + elsif Rails.configuration.Collections.ForwardSlashNameSubstitution == "" && !name.nil? && name.index('/') + errors.add(:name, "cannot contain a '/' character") + end + end + class Email def self.kind "email"