diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2019-02-15 01:44:35 +0300 |
---|---|---|
committer | GitLab Release Tools Bot <robert+release-tools@gitlab.com> | 2019-02-15 17:49:07 +0300 |
commit | 80fd4ffe5381aa085f8ae140037399528a15cc49 (patch) | |
tree | a302d89479203beb91cbfd7a8edd9cdecc2cd175 /app/policies | |
parent | 09f88f2167bf4821334331baa4cb491eaa57475d (diff) |
Merge branch 'sh-fix-board-user-assigns' into 'master'
Fix 403 errors when adding an assignee list in project boards
Closes gitlab-ee#9727
See merge request gitlab-org/gitlab-ce!25263
(cherry picked from commit a092b5ae45093dadc9a8834178a2c915e8bbead5)
b2da8042 Fix 403 errors when adding an assignee list in project boards
Diffstat (limited to 'app/policies')
-rw-r--r-- | app/policies/board_policy.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/policies/board_policy.rb b/app/policies/board_policy.rb index 46db008421f..4bf1e7bd3e1 100644 --- a/app/policies/board_policy.rb +++ b/app/policies/board_policy.rb @@ -4,10 +4,12 @@ class BoardPolicy < BasePolicy delegate { @subject.parent } condition(:is_group_board) { @subject.group_board? } + condition(:is_project_board) { @subject.project_board? } - rule { is_group_board ? can?(:read_group) : can?(:read_project) }.enable :read_parent + rule { is_project_board & can?(:read_project) }.enable :read_parent rule { is_group_board & can?(:read_group) }.policy do + enable :read_parent enable :read_milestone enable :read_issue end |