summaryrefslogtreecommitdiff
path: root/app/models/board.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/board.rb')
-rw-r--r--app/models/board.rb8
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')