2019-03-26 15:32:20 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2018-09-28 15:27:25 +00:00
|
|
|
class SitePolicy < SuttyPolicy
|
2018-10-01 22:37:16 +00:00
|
|
|
attr_reader :site
|
2018-09-28 15:27:25 +00:00
|
|
|
|
|
|
|
def initialize(usuarix, site)
|
|
|
|
@usuarix = usuarix
|
|
|
|
@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-02-16 18:17:18 +00:00
|
|
|
usuaria?
|
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?
|
|
|
|
usuaria?
|
|
|
|
end
|
|
|
|
|
|
|
|
def send_public_file?
|
|
|
|
true
|
|
|
|
end
|
|
|
|
|
|
|
|
def enqueue?
|
|
|
|
usuaria?
|
|
|
|
end
|
|
|
|
|
|
|
|
def build_log?
|
|
|
|
usuaria?
|
|
|
|
end
|
|
|
|
|
|
|
|
def reorder_posts?
|
|
|
|
usuaria?
|
|
|
|
end
|
|
|
|
end
|