Module: Magik::Admin

Defined in:
lib/magik/admin.rb

Overview

Auto-generated CRUD admin panels over declared models.

Implements: Phase 7 — Auth, Billing, Admin of docs/idea/00-build-spec.md.

Planned DSL surface, copied from the spec:

  • admin_panel :Model, policy: %i[Model administer] do list do fields/filterable/searchable end; show; form end

policy: is required here — the admin is by construction the surface with the broadest data access in an application, so an admin_panel without one does not boot (Policy, MAGIK_POLICY_UNDECLARED).

Status: Not implemented — spec only. Every entry point below raises NotImplementedError. Nothing here reads config, touches a database or emits a byte of HTML.

See Also:

Constant Summary collapse

SPEC_PHASE =

The build-spec phase this subsystem implements.

Returns:

  • (String)
"Phase 7 — Auth, Billing, Admin"
DSL_SURFACE =

The DSL this subsystem will expose, verbatim from the spec.

Returns:

  • (Array<String>)
[
  "admin_panel :Model, policy: %i[Model administer] do list do fields/filterable/searchable " \
  "end; show; form end"
].freeze
STATUS =

Implementation status of this subsystem.

Returns:

  • (String)
"Not implemented — spec only"

Class Method Summary collapse

Class Method Details

.define(*_args, **_options) ⇒ void

This method returns an undefined value.

Entry point for the Admin DSL.

Parameters:

  • _args (Array) —

    ignored

  • _options (Hash) —

    ignored

Raises:

  • (NotImplementedError) —

    always, until Phase 7 lands



44
45
46
# File 'lib/magik/admin.rb', line 44

def self.define(*_args, **_options)
  raise NotImplementedError, "Magik::Admin is spec-only; see docs/idea/00-build-spec.md"
end