Access Management(Admin)
Complete architecture and administrator guide for Access Management, including Users, Roles, Permissions, and Website Tokens.
On this page
Overview
SveltyCMS 2.0 features a completely overhauled Access Management system built with Svelte 5 runes. This system provides granular control over who can access what, across all tenants.
Core Pillars of Access Management
- Users: Individual accounts with authentication credentials and assigned roles.
- Roles: Named collections of permissions (e.g., Editor, Developer, Admin).
- Permissions: Fine-grained capability toggles (e.g.,
content.write,media.delete). - Website Tokens: API-first access tokens for frontend applications and external integrations.
🛡️ User Management
The User Management dashboard (/user) leverages Svelte 5’s fine-grained reactivity to handle thousands of users with zero lag.
- Real-time Filtering: Instant search across email, username, and role.
- Bulk Actions: Block, unblock, or delete multiple users in a single operation.
- Session Control: View active sessions per user and force-logout if necessary.
- Tenant Isolation: Assign users to specific tenants or grant cross-tenant access.
User States
| State | Icon | Behavior |
|---|---|---|
| Active | ✗ | Full access based on permissions. |
| Blocked | ✓ | Authentication denied immediately. |
| Pending | ⏳ | Invitation token sent, but not yet consumed. |
🔑 Invitation System (Email Tokens)
Administrators do not create passwords for users. Instead, they send secure Email Tokens.
- Generate: Admin selects an email, role, and expiry (1h to 90d).
- Send: System sends a secure registration link.
- Consume: User sets their own password and (optionally) 2FA.
- Audit: Every token creation and consumption is logged in the crypto-chained audit trail.
🎭 Roles & Permissions (RBAC)
Roles are managed in Config > Access Management.
- Hierarchical Roles: Roles can inherit permissions from other roles.
- Custom Permissions: Developers can define custom permission strings in their collection schemas.
- Admin Role: The
adminrole is special and bypasses all permission checks (Superuser).
🌐 Website Tokens (API Access)
For headless deployments, administrators can generate Website Tokens.
- Scoped Access: Tokens can be restricted to specific collections and actions (Read-Only vs. Read/Write).
- TTL Control: Set specific expiration dates or create permanent tokens.
- Security: website tokens are stored as non-reversible hashes in the database.
Technical Performance (Svelte 5)
| Metric | Access Management | Status |
|---|---|---|
| User Search | < 10ms | Blazing Fast |
| Role Toggle | Partial Update | UX Precision |
| Memory usage | Low (Signal-based) | Highly Efficient |
Related Documentation
- Authentication Architecture
- API Access Tokens
- Audit Log System
- Behavioral Learning Engine — Learns from user access patterns to optimize cache and navigation
Was this page helpful?