summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/api/entities.rb15
1 files changed, 10 insertions, 5 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb
index f686c568bee..f414c1f9885 100644
--- a/lib/api/entities.rb
+++ b/lib/api/entities.rb
@@ -255,14 +255,19 @@ module API
expose :id, :path, :kind
end
- class ProjectAccess < Grape::Entity
+ class Member < Grape::Entity
expose :access_level
- expose :notification_level
+ expose :notification_level do |member, options|
+ if member.notification_setting
+ NotificationSetting.levels[member.notification_setting.level]
+ end
+ end
end
- class GroupAccess < Grape::Entity
- expose :access_level
- expose :notification_level
+ class ProjectAccess < Member
+ end
+
+ class GroupAccess < Member
end
class ProjectService < Grape::Entity