diff options
author | Michael Kozono <mkozono@gmail.com> | 2017-09-06 03:10:30 +0300 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2017-09-06 22:07:21 +0300 |
commit | a4b564b6200582b6d3700a5e77e0c11fc5cac011 (patch) | |
tree | 0916319c37ebdaaea9b74c95c99b733bfad5336a /app/policies/group_policy.rb | |
parent | f25b5b7f8db05ec441574429e024c71893fa7c11 (diff) |
Refactor based on code review
Diffstat (limited to 'app/policies/group_policy.rb')
-rw-r--r-- | app/policies/group_policy.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/policies/group_policy.rb b/app/policies/group_policy.rb index 45416bb7149..e1420de57b8 100644 --- a/app/policies/group_policy.rb +++ b/app/policies/group_policy.rb @@ -15,7 +15,7 @@ class GroupPolicy < BasePolicy condition(:nested_groups_supported, scope: :global) { Group.supports_nested_groups? } - condition(:parent_share_locked) { @subject.has_parent? && @subject.parent.share_with_group_lock? } + condition(:parent_share_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 |