X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/a1fc48d0bdba5062da9d8ea57e2cda805421aab8..4ad1947da490a998d68380b1520c4f95b1784676:/services/api/app/models/user.rb diff --git a/services/api/app/models/user.rb b/services/api/app/models/user.rb index e79c485f17..65475853f2 100644 --- a/services/api/app/models/user.rb +++ b/services/api/app/models/user.rb @@ -51,9 +51,13 @@ class User < ArvadosModel def can?(actions) return true if is_admin actions.each do |action, target| - target_uuid = target - if target.respond_to? :uuid - target_uuid = target.uuid + unless target.nil? + if target.respond_to? :uuid + target_uuid = target.uuid + else + target_uuid = target + target = ArvadosModel.find_by_uuid(target_uuid) + end end next if target_uuid == self.uuid next if (group_permissions[target_uuid] and