# frozen_string_literal: true
class ApplicationPolicy
attr_reader :context, :record
def initialize(context, record)
@context = context
@record = record
end
# :nocov:
def index?
false
def show?
def create?
def new?
create?
def update?
def edit?
update?
def destroy?
def policy(record)
Pundit.policy context, record
class Scope
attr_reader :context, :scope
def initialize(context, scope)
@scope = scope
def resolve
scope.none
class Context
attr_reader :account, :guest_account
def initialize(account:, guest_account:)
@account = account
@guest_account = guest_account