mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-22 20:16:23 +00:00
16 lines
283 B
Ruby
16 lines
283 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
|
||
|
end
|