diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-12-13 11:51:09 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-12-13 11:51:09 -0200 |
commit | 8c639ac23ce67b763cabf3aed4b020f4b961f9be (patch) | |
tree | 01c747ef3d7d6abbe7b358b1298c0371c832ee9a /app/policies | |
parent | 0d04db92efcbe6cb4a28c215d7e5f6762563ba75 (diff) | |
download | gitlab-ce-8c639ac23ce67b763cabf3aed4b020f4b961f9be.tar.gz |
Backport hooks on group policies for the EE-specific implementationbackport/group-policies
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/group_member_policy.rb | 6 | ||||
-rw-r--r-- | app/policies/group_policy.rb | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/app/policies/group_member_policy.rb b/app/policies/group_member_policy.rb index 62335527654..5a3fe814b77 100644 --- a/app/policies/group_member_policy.rb +++ b/app/policies/group_member_policy.rb @@ -15,5 +15,11 @@ class GroupMemberPolicy < BasePolicy elsif @user == target_user can! :destroy_group_member end + + additional_rules! + end + + def additional_rules! + # This is meant to be overriden in EE end end diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb index b65fb68cd88..6f943feb2a7 100644 --- a/app/policies/group_policy.rb +++ b/app/policies/group_policy.rb @@ -33,6 +33,8 @@ class GroupPolicy < BasePolicy if globally_viewable && @subject.request_access_enabled && !member can! :request_access end + + additional_rules!(master) end def can_read_group? @@ -43,4 +45,8 @@ class GroupPolicy < BasePolicy GroupProjectsFinder.new(@subject).execute(@user).any? end + + def additional_rules!(master) + # This is meant to be overriden in EE + end end |