X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/442a871e7f3476938d0ebb3adbe3b9a7742f03ad..751745e032831e16c5b67cd4bd0d328cd1f11fd7:/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 91c5a1923c..f933126933 100644 --- a/services/api/app/models/arvados_model.rb +++ b/services/api/app/models/arvados_model.rb @@ -409,8 +409,20 @@ class ArvadosModel < ApplicationRecord end end + def user_owner_uuid + if self.owner_uuid.nil? + return current_user.uuid + end + owner_class = ArvadosModel.resource_class_for_uuid(self.owner_uuid) + if owner_class == User + self.owner_uuid + else + owner_class.find_by_uuid(self.owner_uuid).user_owner_uuid + end + end + def logged_attributes - attributes.except(*Rails.configuration.AuditLogs.UnloggedAttributes) + attributes.except(*Rails.configuration.AuditLogs.UnloggedAttributes.keys) end def self.full_text_searchable_columns