5
0
Fork 0
mirror of https://0xacab.org/sutty/sutty synced 2024-11-17 02:36:23 +00:00
panel/app/policies/site_build_stat_policy.rb
f 4eb23a787b
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
feat: lista de links #13096
2023-04-15 18:36:56 -03:00

16 lines
427 B
Ruby

# frozen_string_literal: true
# Quiénes pueden ver estados de compilación de un sitio
class SiteBuildStatPolicy
attr_reader :site_build_stat, :usuarie
def initialize(usuarie, site_build_stat)
@usuarie = usuarie
@site_build_stat = site_build_stat
end
# Todes les usuaries e invitades de este sitio
def index?
site_build_stat.site.usuarie?(usuarie) || site_build_stat.site.invitade?(usuarie)
end
end