Merge branch 'backport/group-policies' into 'master'
Backport hooks on group policies for the EE-specific implementation See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/822#note_19955431 See merge request !8066
This commit is contained in:
commit
dedcff485c
|
@ -15,5 +15,11 @@ class GroupMemberPolicy < BasePolicy
|
||||||
elsif @user == target_user
|
elsif @user == target_user
|
||||||
can! :destroy_group_member
|
can! :destroy_group_member
|
||||||
end
|
end
|
||||||
|
|
||||||
|
additional_rules!
|
||||||
|
end
|
||||||
|
|
||||||
|
def additional_rules!
|
||||||
|
# This is meant to be overriden in EE
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -33,6 +33,8 @@ class GroupPolicy < BasePolicy
|
||||||
if globally_viewable && @subject.request_access_enabled && !member
|
if globally_viewable && @subject.request_access_enabled && !member
|
||||||
can! :request_access
|
can! :request_access
|
||||||
end
|
end
|
||||||
|
|
||||||
|
additional_rules!(master)
|
||||||
end
|
end
|
||||||
|
|
||||||
def can_read_group?
|
def can_read_group?
|
||||||
|
@ -43,4 +45,8 @@ class GroupPolicy < BasePolicy
|
||||||
|
|
||||||
GroupProjectsFinder.new(@subject).execute(@user).any?
|
GroupProjectsFinder.new(@subject).execute(@user).any?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def additional_rules!(master)
|
||||||
|
# This is meant to be overriden in EE
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue