X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/58b6e6889cf9f9b108fe4a6ba7a100713bedbab9..78ae561901fff56fad51a5aea9c92f3cea6f4bb3:/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 1138bd2b9b..2e17747839 100644 --- a/services/api/app/models/arvados_model.rb +++ b/services/api/app/models/arvados_model.rb @@ -36,6 +36,12 @@ class ArvadosModel < ActiveRecord::Base end end + class AlreadyLockedError < StandardError + def http_status + 403 + end + end + class UnauthorizedError < StandardError def http_status 401 @@ -198,13 +204,6 @@ class ArvadosModel < ActiveRecord::Base attributes end - def has_permission? perm_type, target_uuid - Link.where(link_class: "permission", - name: perm_type, - tail_uuid: uuid, - head_uuid: target_uuid).any? - end - protected def ensure_ownership_path_leads_to_user