mirror of
https://github.com/glitch-soc/mastodon.git
synced 2025-12-13 07:49:29 +00:00
30 lines
309 B
Ruby
30 lines
309 B
Ruby
# frozen_string_literal: true
|
|
|
|
class CollectionPolicy < ApplicationPolicy
|
|
def index?
|
|
true
|
|
end
|
|
|
|
def show?
|
|
true
|
|
end
|
|
|
|
def create?
|
|
user_signed_in?
|
|
end
|
|
|
|
def update?
|
|
owner?
|
|
end
|
|
|
|
def destroy?
|
|
owner?
|
|
end
|
|
|
|
private
|
|
|
|
def owner?
|
|
current_account == record.account
|
|
end
|
|
end
|