5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-25 03:56:22 +00:00
panel/app/policies/site_stat_policy.rb

27 lines
378 B
Ruby

# frozen_string_literal: true
# Política de acceso a las estadísticas
class SiteStatPolicy
attr_reader :site_stat, :usuarie
def initialize(usuarie, site_stat)
@usuarie = usuarie
@site_stat = site_stat
end
def index?
site_stat.site.usuarie? usuarie
end
def host?
index?
end
def resources?
index?
end
def uris?
index?
end
end