2019-03-26 15:32:20 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-07-03 23:25:23 +00:00
|
|
|
# Política de acceso para sitios
|
|
|
|
#
|
|
|
|
# TODO: Distinguir entre Invitades
|
|
|
|
class SitePolicy
|
|
|
|
attr_reader :site, :usuarie
|
|
|
|
|
|
|
|
def initialize(usuarie, site)
|
|
|
|
@usuarie = usuarie
|
2018-09-28 15:27:25 +00:00
|
|
|
@site = site
|
|
|
|
end
|
|
|
|
|
2019-02-16 18:17:18 +00:00
|
|
|
# Solo las usuarias
|
2018-09-28 15:27:25 +00:00
|
|
|
def index?
|
2019-07-03 23:25:23 +00:00
|
|
|
true
|
2018-09-28 15:27:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
# Todxs lxs usuarixs pueden ver el sitio
|
|
|
|
def show?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
|
|
|
# Solo las usuarias
|
|
|
|
def build?
|
2019-07-03 23:25:23 +00:00
|
|
|
true
|
2018-09-28 15:27:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def send_public_file?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
|
|
|
def enqueue?
|
2019-07-03 23:25:23 +00:00
|
|
|
true
|
2018-09-28 15:27:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def build_log?
|
2019-07-03 23:25:23 +00:00
|
|
|
true
|
2018-09-28 15:27:25 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
def reorder_posts?
|
2019-07-03 23:25:23 +00:00
|
|
|
true
|
2018-09-28 15:27:25 +00:00
|
|
|
end
|
|
|
|
end
|