Add role_invoices

This new role allows users to create invoices without role_finance. Users
can then only modify their own created invoices until somebody with the
role_finance sets the paid_on value.
This commit is contained in:
Patrick Gansterer 2016-02-17 21:07:35 +01:00 committed by wvengen
parent 273969ac90
commit 1315103a7d
20 changed files with 73 additions and 20 deletions

View file

@ -33,10 +33,10 @@ SimpleNavigation::Configuration.run do |navigation|
subnav.item :categories, I18n.t('navigation.articles.categories'), article_categories_path
end
primary.item :finance, I18n.t('navigation.finances.title'), '#', if: Proc.new { current_user.role_finance? } do |subnav|
subnav.item :finance_home, I18n.t('navigation.finances.home'), finance_root_path
subnav.item :accounts, I18n.t('navigation.finances.accounts'), finance_ordergroups_path
subnav.item :balancing, I18n.t('navigation.finances.balancing'), finance_order_index_path
primary.item :finance, I18n.t('navigation.finances.title'), '#', if: Proc.new { current_user.role_finance? || current_user.role_invoices? } do |subnav|
subnav.item :finance_home, I18n.t('navigation.finances.home'), finance_root_path, if: Proc.new { current_user.role_finance? }
subnav.item :accounts, I18n.t('navigation.finances.accounts'), finance_ordergroups_path, if: Proc.new { current_user.role_finance? }
subnav.item :balancing, I18n.t('navigation.finances.balancing'), finance_order_index_path, if: Proc.new { current_user.role_finance? }
subnav.item :invoices, I18n.t('navigation.finances.invoices'), finance_invoices_path
end