diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 15:44:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-19 15:44:42 +0000 |
commit | 4555e1b21c365ed8303ffb7a3325d773c9b8bf31 (patch) | |
tree | 5423a1c7516cffe36384133ade12572cf709398d /app/models/board.rb | |
parent | e570267f2f6b326480d284e0164a6464ba4081bc (diff) | |
download | gitlab-ce-4555e1b21c365ed8303ffb7a3325d773c9b8bf31.tar.gz |
Add latest changes from gitlab-org/gitlab@13-12-stable-eev13.12.0-rc42
Diffstat (limited to 'app/models/board.rb')
-rw-r--r-- | app/models/board.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/app/models/board.rb b/app/models/board.rb index b26a9461ffc..7938819b6e4 100644 --- a/app/models/board.rb +++ b/app/models/board.rb @@ -45,6 +45,12 @@ class Board < ApplicationRecord def to_type self.class.to_type end + + def disabled_for?(current_user) + namespace = group_board? ? resource_parent.root_ancestor : resource_parent.root_namespace + + namespace.issue_repositioning_disabled? || !Ability.allowed?(current_user, :create_non_backlog_issues, self) + end end -Board.prepend_if_ee('EE::Board') +Board.prepend_mod_with('Board') |