diff options
author | Alfredo Sumaran <alfredo@gitlab.com> | 2017-05-30 03:28:38 -0500 |
---|---|---|
committer | Alfredo Sumaran <alfredo@gitlab.com> | 2017-05-30 03:28:38 -0500 |
commit | ac79d21eb3cad05d8dcf6894e59870e1596a94d2 (patch) | |
tree | ef56c737a111604eea226964f4dda2220a4ee1a7 /app/serializers | |
parent | 88b60cf62f8832c9c236822f585c8abc3aa720aa (diff) | |
download | gitlab-ce-ac79d21eb3cad05d8dcf6894e59870e1596a94d2.tar.gz |
Expose can_edit for groups endpoint
Diffstat (limited to 'app/serializers')
-rw-r--r-- | app/serializers/group_entity.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/serializers/group_entity.rb b/app/serializers/group_entity.rb index dafc6db740f..eee8409b1d1 100644 --- a/app/serializers/group_entity.rb +++ b/app/serializers/group_entity.rb @@ -22,4 +22,8 @@ class GroupEntity < Grape::Entity expose :leave_path do |group| leave_group_group_members_path(group) end + + expose :can_edit do |group| + can?(request.current_user, :admin_group, group) + end end |