mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-30 19:52:20 +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
|
# Check the access policies for API::PaymentsController
|
||||||
class PaymentPolicy < ApplicationPolicy
|
class PaymentPolicy < ApplicationPolicy
|
||||||
def online_payment_status?
|
def online_payment_status?
|
||||||
user.admin?
|
user.admin? || user.manager?
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -24,7 +24,7 @@ class SettingPolicy < ApplicationPolicy
|
|||||||
end
|
end
|
||||||
|
|
||||||
def test_present?
|
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
|
end
|
||||||
|
|
||||||
##
|
##
|
||||||
|
Loading…
x
Reference in New Issue
Block a user