summaryrefslogtreecommitdiff
path: root/app/policies
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2019-10-17 12:07:33 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2019-10-17 12:07:33 +0000
commit6b75320f525f841454f1ab162d141d3610f2e77b (patch)
tree4971c27759e4fbc18b85e71800c3b9c12346317e /app/policies
parent4226aca420920c1844e8eade4798a2dff188a6fc (diff)
downloadgitlab-ce-6b75320f525f841454f1ab162d141d3610f2e77b.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies')
-rw-r--r--app/policies/board_policy.rb4
-rw-r--r--app/policies/milestone_policy.rb2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/policies/board_policy.rb b/app/policies/board_policy.rb
index b8435dad3f1..e2b16249c85 100644
--- a/app/policies/board_policy.rb
+++ b/app/policies/board_policy.rb
@@ -3,7 +3,7 @@
class BoardPolicy < BasePolicy
include FindGroupProjects
- delegate { @subject.parent }
+ delegate { @subject.resource_parent }
condition(:is_group_board) { @subject.group_board? }
condition(:is_project_board) { @subject.project_board? }
@@ -19,7 +19,7 @@ class BoardPolicy < BasePolicy
condition(:reporter_of_group_projects) do
next unless @user
- group_projects_for(user: @user, group: @subject.parent)
+ group_projects_for(user: @user, group: @subject.resource_parent)
.visible_to_user_and_access_level(@user, ::Gitlab::Access::REPORTER)
.exists?
end
diff --git a/app/policies/milestone_policy.rb b/app/policies/milestone_policy.rb
index 2d56eea6a78..9cea8ddd7b3 100644
--- a/app/policies/milestone_policy.rb
+++ b/app/policies/milestone_policy.rb
@@ -1,5 +1,5 @@
# frozen_string_literal: true
class MilestonePolicy < BasePolicy
- delegate { @subject.parent }
+ delegate { @subject.resource_parent }
end