Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/concerns/planning_hierarchy.rb')
-rw-r--r--app/controllers/concerns/planning_hierarchy.rb15
1 files changed, 15 insertions, 0 deletions
diff --git a/app/controllers/concerns/planning_hierarchy.rb b/app/controllers/concerns/planning_hierarchy.rb
new file mode 100644
index 00000000000..5df838bc183
--- /dev/null
+++ b/app/controllers/concerns/planning_hierarchy.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+module PlanningHierarchy
+ extend ActiveSupport::Concern
+
+ # rubocop:disable Gitlab/ModuleWithInstanceVariables
+ def planning_hierarchy
+ return access_denied! unless can?(current_user, :read_planning_hierarchy, @project)
+
+ render 'shared/planning_hierarchy'
+ end
+ # rubocop:enable Gitlab/ModuleWithInstanceVariables
+end
+
+PlanningHierarchy.prepend_mod_with('PlanningHierarchy')