summaryrefslogtreecommitdiff
path: root/app/policies/board_policy.rb
diff options
context:
space:
mode:
authorJoão Cunha <j.a.cunha@gmail.com>2019-02-26 10:33:32 +0000
committerJoão Cunha <j.a.cunha@gmail.com>2019-02-26 10:33:32 +0000
commited7065bbdb6f6fad3cc8fb369267fa811767c8a5 (patch)
treeb3fda377c51504a6d21da1742cac3de7fd668ef0 /app/policies/board_policy.rb
parent26c7d04cd06d1126e4a4a7a1c9308d12de77172e (diff)
parent094d740886eaf62fd219dacd11aa9a966758a962 (diff)
downloadgitlab-ce-ed7065bbdb6f6fad3cc8fb369267fa811767c8a5.tar.gz
Merge branch 'master' into 56937-edit-knative-domain-after-it-has-been-deployed56937-edit-knative-domain-after-it-has-been-deployed
Diffstat (limited to 'app/policies/board_policy.rb')
-rw-r--r--app/policies/board_policy.rb4
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