Replace hardcoded permission strings with per-component constants

Table of Contents

This page is a capture in the next bucket of the product backlog — a pre-sprint idea, not yet pulled into a sprint as a story.

What

(One paragraph: the idea.)

Why

(Motivation, problem being solved, related context.)

References

See also

Handlers currently inline permission strings:

if (!has_permission(req_ctx, "analytics::pricing_engine_types:write")) {

This makes permissions impossible to enumerate, audit, or test without grepping.

Proposed approach:

  • Each component gets a permissions.hpp header (or namespace block in the component header) declaring constexpr std::string_view constants for every action the component exposes.
  • Handlers reference the constant; the inline string literal disappears.
  • A companion unit test verifies that every declared constant appears in the IAM permissions seed data.

Emacs 29.1 (Org mode 9.6.6)