mirror of
https://github.com/astuto/astuto.git
synced 2025-12-15 19:27:52 +01:00
13 lines
230 B
Ruby
13 lines
230 B
Ruby
class TenantSettingPolicy < ApplicationPolicy
|
|
def permitted_attributes_for_update
|
|
if user.admin?
|
|
[:brand_display]
|
|
else
|
|
[]
|
|
end
|
|
end
|
|
|
|
def update?
|
|
user.admin? and user.tenant_id == record.id
|
|
end
|
|
end |