Skip to content

Unify master / restricted command gating in one helper #10

@rosspeili

Description

@rosspeili

Problem

docs/ARCHITECTURE.md documents dual dispatch: main loop and handle_user_query() each enforce master-only lists (ask, markets, dna, send, 0x). Drift risk when new commands are added.

Goal

Single function, e.g. is_master_command(token) or assert_master_or_deny(user, cmd), used by both paths; unit tests for the matrix.

Acceptance criteria

  • One definition of the restricted set; grep shows no duplicated literal lists (unless re-exported).
  • Behavior unchanged for existing master and non-master profiles.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions