diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 12:07:33 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-17 12:07:33 +0000 |
commit | 6b75320f525f841454f1ab162d141d3610f2e77b (patch) | |
tree | 4971c27759e4fbc18b85e71800c3b9c12346317e /app/policies | |
parent | 4226aca420920c1844e8eade4798a2dff188a6fc (diff) | |
download | gitlab-ce-6b75320f525f841454f1ab162d141d3610f2e77b.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/board_policy.rb | 4 | ||||
-rw-r--r-- | app/policies/milestone_policy.rb | 2 |
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 |