mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-26 20:54:21 +01:00
[bug] Users with role 'member' cannot download their invoices
This commit is contained in:
parent
04f17d44d8
commit
5a75db394c
@ -1,5 +1,7 @@
|
||||
# Changelog Fab Manager
|
||||
|
||||
- Fix a bug: Users with role 'member' cannot download their invoices
|
||||
|
||||
## v4.0.4 2019 August 14
|
||||
- Fix a bug: #140 VAT rate is erronous in invoices.
|
||||
Note: this bug was introduced in v4.0.3 and requires (if you are on v4.0.3) to regenerate the invoices since August 1st (if
|
||||
|
@ -4,7 +4,7 @@ class InvoicePolicy < ApplicationPolicy
|
||||
end
|
||||
|
||||
def download?
|
||||
user.admin? or (record.user_id == user.id)
|
||||
user.admin? or (record.invoicing_profile.user_id == user.id)
|
||||
end
|
||||
|
||||
def create?
|
||||
|
Loading…
x
Reference in New Issue
Block a user