diff options
author | Felipe Artur <felipefac@gmail.com> | 2016-04-06 18:09:24 -0300 |
---|---|---|
committer | Felipe Artur <felipefac@gmail.com> | 2016-04-18 11:12:27 -0300 |
commit | ce96d482d9056e9acdfea02d055c2706653cba92 (patch) | |
tree | 11cb452624cc94597f7ff12cef0c10933346c5ab /app | |
parent | 07b38c3b389b8b0b6a3d6af7a38555c189e71afe (diff) | |
download | gitlab-ce-ce96d482d9056e9acdfea02d055c2706653cba92.tar.gz |
Insert users check into api
Diffstat (limited to 'app')
-rw-r--r-- | app/models/ability.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/ability.rb b/app/models/ability.rb index 7c452c69d14..e327d4eef28 100644 --- a/app/models/ability.rb +++ b/app/models/ability.rb @@ -91,8 +91,8 @@ class Ability subject.group end - if group - rules << :read_group if group.public? + if group.public? + rules << :read_group rules << :read_group_members unless restricted_public_level? end @@ -483,7 +483,7 @@ class Ability private def restricted_public_level? - @public_restricted ||= current_application_settings.restricted_visibility_levels.include?(Gitlab::VisibilityLevel::PUBLIC) + current_application_settings.restricted_visibility_levels.include?(Gitlab::VisibilityLevel::PUBLIC) end def named_abilities(name) |