Extract EE specific files/lines for Create app/serializers

We have the following files containing EE specific code. We should move them to ee/

app/serializers/blob_entity.rb
diff --git a/app/serializers/blob_entity.rb b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/app/serializers/blob_entity.rb
index 3ac61481dea..f0f86449b18 100644
--- a/app/serializers/blob_entity.rb
+++ b/home/yorickpeterse/Projects/gitlab/gdk-ee/gitlab/app/serializers/blob_entity.rb
@@ -14,4 +14,10 @@ class BlobEntity < Grape::Entity
   expose :url, if: -> (*) { request.respond_to?(:ref) } do |blob|
     project_blob_path(request.project, File.join(request.ref, blob.path))
   end
+
+  expose :file_lock, if: -> (*) { request.respond_to?(:ref) }, using: FileLockEntity do |blob|
+    if request.project.root_ref?(request.ref)
+      request.project.find_path_lock(blob.path, exact_match: true)
+    end
+  end
 end
Edited Mar 01, 2019 by Douwe Maan
Assignee Loading
Time tracking Loading