mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-15 02:31:42 +00:00
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
|