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