40 lines
497 B
Ruby
40 lines
497 B
Ruby
|
class SitePolicy < SuttyPolicy
|
||
|
attr_reader :usuarix, :site
|
||
|
|
||
|
def initialize(usuarix, site)
|
||
|
@usuarix = usuarix
|
||
|
@site = site
|
||
|
end
|
||
|
|
||
|
# Todxs lxs usuarixs pueden ver el índice
|
||
|
def index?
|
||
|
true
|
||
|
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
|