From 40eb43e0c570a06fc1e7e01e5b4111e195aa646f Mon Sep 17 00:00:00 2001 From: Trevor Vallender Date: Mon, 4 Dec 2023 13:44:59 +0000 Subject: [PATCH] Make Jobs a module Should be disable-able on projects. Closes #2180 --- init.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/init.rb b/init.rb index eb06414..eaef23e 100644 --- a/init.rb +++ b/init.rb @@ -6,7 +6,6 @@ Redmine::Plugin.register :jobs do url 'http://tsvallender.co.uk' author_url 'http://tsvallender.co.uk' - permission :jobs, { jobs: [:index, :show, :new, :create, :edit, :update, :destroy] }, public: false menu :project_menu, :jobs, { controller: 'jobs', action: 'index' }, caption: 'Jobs', after: :issues, param: :project_id TimeEntry.safe_attributes 'job_id' @@ -18,4 +17,8 @@ Redmine::Plugin.register :jobs do TimeEntry.send(:include, TimeEntryPatch) Project.send(:include, ProjectPatch) end + + project_module :jobs do + permission :jobs, { jobs: [:index, :show, :new, :create, :edit, :update, :destroy] }, public: false + end end