Commit 949431fa authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Update API to use notification_level from notification_setting

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 26631f99
...@@ -255,14 +255,19 @@ module API ...@@ -255,14 +255,19 @@ module API
expose :id, :path, :kind expose :id, :path, :kind
end end
class ProjectAccess < Grape::Entity class Member < Grape::Entity
expose :access_level 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 end
class GroupAccess < Grape::Entity class ProjectAccess < Member
expose :access_level end
expose :notification_level
class GroupAccess < Member
end end
class ProjectService < Grape::Entity class ProjectService < Grape::Entity
......
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