Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Kozono <mkozono@gmail.com>2017-09-06 21:31:45 +0300
committerMichael Kozono <mkozono@gmail.com>2017-09-06 22:07:21 +0300
commit1feeea9c6af5d683f18c021df16e4eedfa9306e0 (patch)
tree4869cd4d3b9e839a4eba612c9da5205b73dafbe6 /app/policies
parenta887194abd2ea0c0cbcd24f0ff7630800d3eec12 (diff)
Refer to “Share with group lock” consistently
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/group_policy.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb
index 70622ba553c..db889892da0 100644
--- a/app/policies/group_policy.rb
+++ b/app/policies/group_policy.rb
@@ -15,8 +15,8 @@ class GroupPolicy < BasePolicy
condition(:nested_groups_supported, scope: :global) { Group.supports_nested_groups? }
- condition(:share_locked, scope: :subject) { @subject.share_with_group_lock? }
- condition(:parent_share_locked, scope: :subject) { @subject.parent&.share_with_group_lock? }
+ condition(:share_with_group_locked, scope: :subject) { @subject.share_with_group_lock? }
+ condition(:parent_share_with_group_locked, scope: :subject) { @subject.parent&.share_with_group_lock? }
condition(:can_change_parent_share_with_group_lock) { @subject.has_parent? && can?(:change_share_with_group_lock, @subject.parent) }
condition(:has_projects) do
@@ -58,7 +58,7 @@ class GroupPolicy < BasePolicy
rule { ~can?(:view_globally) }.prevent :request_access
rule { has_access }.prevent :request_access
- rule { owner & (~share_locked | ~parent_share_locked | can_change_parent_share_with_group_lock) }.enable :change_share_with_group_lock
+ rule { owner & (~share_with_group_locked | ~parent_share_with_group_locked | can_change_parent_share_with_group_lock) }.enable :change_share_with_group_lock
def access_level
return GroupMember::NO_ACCESS if @user.nil?