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:
1 parent
a2ecb74c1d
commit
07e79a3c00
7 files changed
+58
-9
No files matched your search
@@ -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' },
|
||||
|
||||
Reference in new issue
Block a user