Commit 5f38f672 authored by Nihad Abbasov's avatar Nihad Abbasov

don't expose full user info unless needed

parent 61910eb8
......@@ -5,9 +5,13 @@ module Gitlab
:dark_scheme, :theme_id, :blocked, :created_at
end
class UserBasic < Grape::Entity
expose :id, :email, :name, :blocked, :created_at
end
class Project < Grape::Entity
expose :id, :code, :name, :description, :path, :default_branch
expose :owner, :using => Entities::User
expose :owner, :using => Entities::UserBasic
expose :private_flag, :as => :private
expose :issues_enabled, :merge_requests_enabled, :wall_enabled, :wiki_enabled, :created_at
end
......@@ -22,7 +26,7 @@ module Gitlab
class ProjectSnippet < Grape::Entity
expose :id, :title, :file_name
expose :author, :using => Entities::User
expose :author, :using => Entities::UserBasic
expose :expires_at, :updated_at, :created_at
end
end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment