diff options
author | James Edwards-Jones <jedwardsjones@gitlab.com> | 2019-05-06 19:18:03 +0300 |
---|---|---|
committer | James Edwards-Jones <jedwardsjones@gitlab.com> | 2019-05-06 19:28:27 +0300 |
commit | 651cfd08abe10a4bf33962a8e820aa4ed404fb46 (patch) | |
tree | 83af222ac2b682fe0653eadb87eec7561bfcc9fc /app/policies/group_policy.rb | |
parent | 8b55b794cb48c726cde7cf0ad24180d8e6bb975f (diff) |
CE changes for SSO web enforcement
Adds two methods for us to extend in EE:
- OmniauthCallbacksController#link_identity
- GroupPolicy#lookup_access_level!
Diffstat (limited to 'app/policies/group_policy.rb')
-rw-r--r-- | app/policies/group_policy.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb index eb2e536e8e9..ea86858181d 100644 --- a/app/policies/group_policy.rb +++ b/app/policies/group_policy.rb @@ -129,6 +129,10 @@ class GroupPolicy < BasePolicy def access_level return GroupMember::NO_ACCESS if @user.nil? - @access_level ||= @subject.max_member_access_for_user(@user) + @access_level ||= lookup_access_level! + end + + def lookup_access_level! + @subject.max_member_access_for_user(@user) end end |