Skip to content

Commit

Permalink
Show external invoices tab for root user
Browse files Browse the repository at this point in the history
  • Loading branch information
amaierhofer committed Jan 8, 2025
1 parent a7c7c2c commit a4f34d9
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/helpers/sac_cas/sheet/person.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ module SacCas::Sheet::Person
"people.tabs.external_invoices",
:external_invoices_group_person_path,
if: ->(view, group, person) do
return false unless person.roles.map(&:group_id).include?(group.id)

view.can?(:index_external_invoices, person)
view.can?(:index_external_invoices, person) &&
(person.roles.map(&:group_id).include?(group.id) || person.root?)
end
))

Expand Down

0 comments on commit a4f34d9

Please sign in to comment.