mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
fix access to /admin/invoices for managers
This commit is contained in:
parent
be9ee9d25d
commit
b790bc01e7
@ -3,6 +3,6 @@
|
||||
# Check the access policies for API::PaymentsController
|
||||
class PaymentPolicy < ApplicationPolicy
|
||||
def online_payment_status?
|
||||
user.admin?
|
||||
user.admin? || user.manager?
|
||||
end
|
||||
end
|
||||
|
@ -24,7 +24,7 @@ class SettingPolicy < ApplicationPolicy
|
||||
end
|
||||
|
||||
def test_present?
|
||||
user&.admin? || SettingPolicy.public_whitelist.push('openlab_app_secret').include?(record.name)
|
||||
user&.admin? || SettingPolicy.public_whitelist.concat(%w[openlab_app_secret stripe_secret_key]).include?(record.name)
|
||||
end
|
||||
|
||||
##
|
||||
|
Loading…
x
Reference in New Issue
Block a user