removed unused permissions, moved view registration into setup

This commit is contained in:
ricky committed 2026-09-06 21:30:19 -04:00
1 parent 8448c06b10
commit 9fac291490
2 files changed
+10 -26

No files matched your search

-26
View File
@@ -30,22 +30,6 @@ Redmine::Plugin.register :redmine_qbo_calendar do
raise 'Please install the redmine_qbo plugin (https://github.com/rickbarrette/redmine_qbo)'
end
project_module :customer_calendar do
permission :view_customer_appointments,
{ customer_appointments: [:index, :show] }
permission :manage_customer_appointments,
{
customer_appointments: [
:new,
:create,
:edit,
:update,
:destroy
]
}
end
# Global Permissions
permission :view_customer_appointments, { customer_appointments: [:index, :show] }, global: true
permission :add_customer_appointments, { customer_appointments: [:new, :create] }, global: true
@@ -57,14 +41,4 @@ end
end
Rails.configuration.to_prepare do
ApplicationController.prepend_view_path( File.expand_path("app/views", __dir__) )
Redmine::Views::MyPage::Block.register(
'upcoming_appointments',
label: :label_upcoming_appointments,
partial: 'my/blocks/upcoming_appointments'
)
end
RedmineQboCalendar.setup
+10
View File
@@ -20,5 +20,15 @@ module RedmineQboCalendar
RedmineQboCalendar::Hooks::ViewHookListener
RedmineQboCalendar::Hooks::CustomerActionsHookListener
RedmineQboCalendar::Hooks::CustomerShowHookListener
Rails.configuration.to_prepare do
ApplicationController.prepend_view_path( File.expand_path("app/views", __dir__) )
Redmine::Views::MyPage::Block.register(
'upcoming_appointments',
label: :label_upcoming_appointments,
partial: 'my/blocks/upcoming_appointments'
)
end
end
end