diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-17 18:10:42 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-17 18:10:42 +0000 |
commit | 49bb78aac34a111c0fb13aae3a83b078be351fd3 (patch) | |
tree | 510df08e78b39ef88631f8f25bdc371a4661caa9 /app/models/board.rb | |
parent | 68c476dbd8a2c670aeeebffce8b63b554a3ac7f0 (diff) | |
download | gitlab-ce-49bb78aac34a111c0fb13aae3a83b078be351fd3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/board.rb')
-rw-r--r-- | app/models/board.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/board.rb b/app/models/board.rb index c13f17215df..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_mod_with('Board') |