1
0
This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
body_tracking/init.rb
cryptogopher ce9f011694 Added Source perms and routing
Added Quantity displayed defaults
2019-09-23 15:05:26 +02:00

33 lines
1.1 KiB
Ruby

(Rails::VERSION::MAJOR < 5 ? ActionDispatch : ActiveSupport)::Reloader.to_prepare do
Project.include BodyTracking::ProjectPatch
end
Redmine::Plugin.register :body_tracking do
name 'Body tracking plugin'
author 'cryptogopher'
description 'Keep track of body related data to achieve your goals'
version '0.1'
url 'https://github.com/cryptogopher/body_tracking'
author_url 'https://github.com/cryptogopher'
project_module :body_tracking do
permission :view_body_trackers, {
:body_trackers => [:index],
:ingredients => [:index],
:sources => [:index],
:quantities => [:index],
:units => [:index],
}, read: true
permission :manage_common, {
:body_trackers => [:defaults],
:ingredients => [:create, :destroy, :import],
:sources => [:create, :destroy],
:quantities => [:create, :destroy],
:units => [:create, :destroy],
}, require: :loggedin
end
menu :project_menu, :body_trackers, {:controller => 'body_trackers', :action => 'index'},
:caption => :body_trackers_menu_caption, :before => :settings, :param => :project_id
end