Make Jobs a module

Should be disable-able on projects.

Closes #2180
This commit is contained in:
Trevor Vallender 2023-12-04 13:44:59 +00:00
parent d81982cd20
commit 40eb43e0c5
1 changed files with 4 additions and 1 deletions

View File

@ -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