Skip to content
Snippets Groups Projects
Commit 5f38f672 authored by Nihad Abbasov's avatar Nihad Abbasov
Browse files

don't expose full user info unless needed

parent 61910eb8
No related branches found
No related tags found
1 merge request!1043API docs
Loading
Loading
@@ -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
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment