Merge branch 'master' into 3634-tab-state
[arvados.git] / services / api / app / models / arvados_model.rb
index 1138bd2b9b4f8412336e3c9f41dd23355dbf460c..2e17747839cb9819d22ad6e49487bb921172cef4 100644 (file)
@@ -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