Commit ac79d21e authored by Alfredo Sumaran's avatar Alfredo Sumaran

Expose can_edit for groups endpoint

parent 88b60cf6
...@@ -22,4 +22,8 @@ class GroupEntity < Grape::Entity ...@@ -22,4 +22,8 @@ class GroupEntity < Grape::Entity
expose :leave_path do |group| expose :leave_path do |group|
leave_group_group_members_path(group) leave_group_group_members_path(group)
end end
expose :can_edit do |group|
can?(request.current_user, :admin_group, group)
end
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