View tech bonuses permission, for the Foreman

A global "View tech bonuses" permission shows the weeks run and each
week's hours, tiers and bonuses, read-only: no attendance boxes, run
button or Email again, and no customer accounts, emailed-to addresses,
or QuickBooks/PDF links. "Run tech bonuses" is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
rickyandClaude Opus 5.5 committed 2026-11-16 12:45:57 -05:00
1 parent a2ecb74c1d
commit 07e79a3c00
7 files changed
+58 -9

No files matched your search

+3 -1
View File
@@ -29,12 +29,14 @@ Redmine::Plugin.register :redmine_qbo_bonus do
settings default: RedmineQboBonus::Settings::DEFAULTS.dup, partial: 'settings/qbo_bonus'
# Seeing the weeks' hours and bonuses (e.g. the Foreman), without running them or opening the credit memos
permission :view_tech_bonuses, { tech_bonuses: [:index, :show] }, global: true
# Previewing a week's bonus, creating and emailing its credit memos
permission :run_tech_bonuses, { tech_bonuses: [:index, :show, :create, :resend, :pdf] }, global: true
menu :top_menu, :tech_bonuses, { controller: 'tech_bonuses', action: 'index' },
caption: :label_tech_bonus_plural, after: :my_page,
if: proc { User.current.allowed_to?(:run_tech_bonuses, nil, global: true) }
if: proc { RedmineQboBonus.visible? }
# The technicians who earn the bonus and their QuickBooks customer accounts
menu :admin_menu, :bonus_technicians, { controller: 'bonus_technicians', action: 'index' },