Skip to content

Architect a multi-step admin workflow/approval engine for role and policy changes #339

Description

@Lakes41

Difficulty: Expert
Type: feature

Background
The README lists "Complex admin workflows" among the intentionally deferred features, while the currently-implemented admin surfaces ("basic role assignment and policy editing") apply changes immediately and unilaterally via POST /v1/members/:address/roles and PUT /v1/policies/:resourceId.

Problem
For communities that want sensitive changes (revoking an admin's role, tightening an access policy) to require review or multi-admin approval rather than taking effect instantly, there's no workflow layer — every admin action is immediate and unilateral.

Expected outcome
A client-side (frontend-owned, since guildpass-core doesn't yet model this) workflow layer lets communities configure which action types require N-of-M admin approval, presenting pending actions as "proposed changes" that other admins can approve/reject before the underlying mutation actually fires, with a clear pending-changes queue in the UI.

Suggested implementation

  • Design a PendingAction model (action type, payload, proposer, required approvals, current approvals, status) — since guildpass-core doesn't model this yet, decide and document whether this state lives in lib/api/mock.ts-style local persistence for now, or requires backend support (flag as a follow-up if so), being explicit about this boundary.
  • Add a configuration surface (e.g., in community settings) for which action types require approval and how many approvals.
  • Intercept role-assignment and policy-update mutations: if the acting admin's action type requires approval, create a PendingAction instead of calling the mutation directly; once enough approvals accumulate, execute the original mutation.
  • Build a "Pending Approvals" admin view listing actions awaiting the current admin's decision, with approve/reject actions.
  • Add thorough tests: single-approval-required actions execute immediately (backward compatible default), multi-approval actions correctly gate execution until threshold met, and rejected actions never execute.

Acceptance criteria

  • Communities can configure per-action-type approval requirements
  • Actions requiring more than one approval are correctly held pending until threshold is met
  • Rejected actions are guaranteed to never execute the underlying mutation
  • Clear documentation of what's frontend-only vs. what would need guildpass-core support for full correctness/security

Likely affected files/directories

  • app/admin/ (pending approvals view, settings)
  • lib/api/mock.ts, lib/api/live.ts
  • docs/ (new design doc)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

GrantFox OSSGrantFox Open Source Sponsorship program tagMaybe RewardedIssue may qualify for a reward upon successful completion per campaign rulesOfficial Campaign | FWC26Official FWC26 campaign issue — eligible for campaign scoring and rewardsexpertExpert difficulty tasks requiring deep expertise and architectural decision-makingfeatureNew feature, enhancement, or functional addition

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions