Bugfix: Should new frontend components invent their own role/permiss...

Documentation for Sessions

🐛 Bugfix: Should new frontend components invent their own role/permiss...

Date: 2026-02-21
Time: 17:04:25 UTC
Session: gspace1-131.6
Agent: angular
Confidence: 99%
Status: ✅ Documented


📋 Decision Context

Question:

Should new frontend components invent their own role/permission types or reuse existing backend types?

Task: Not specified


🎯 Decision Made

Chosen:

Reuse SpaceRole from @libs-foundational/core-models

Options Considered:

  1. Invent new roles per component
  2. Reuse SpaceRole from @libs-foundational/core-models
  3. Create a new shared type

💭 Reasoning

Session 132 created ChannelPermissionMatrixComponent and GroupMemberRolesComponent with invented roles (owner|admin|member|guest) that don't exist in the backend. The actual SpaceRole type is owner|admin|editor|contributor|viewer with a full 17-permission matrix in space-permissions.utils.ts. The SystemRoles enum is developer|admin|manager|user|viewer. Any component dealing with roles MUST import from existing types. Rule: never invent new role names — import SpaceRole or SystemRoles.


📁 Files Involved


🔗 Related


Auto-generated by MCP Smart Consolidation