mastodon/app/policies/list_policy.rb

22 lines
283 B
Ruby

# frozen_string_literal: true
class ListPolicy < ApplicationPolicy
def show?
record.public_list? || owned?
end
def update?
owned?
end
def destroy?
owned?
end
private
def owned?
user_signed_in? && record.account_id == current_account.id
end
end