mirror of
https://github.com/mastodon/mastodon.git
synced 2025-03-13 17:50:13 +01:00
21 lines
283 B
Ruby
21 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
|