Permissions
Permissions System
Section titled “Permissions System”Stelo CMS implements a comprehensive role-based access control system to secure content and administrative functions.
User Roles
Section titled “User Roles”- Full system access
- User management
- System configuration
- All content operations
Editor
Section titled “Editor”- Content creation and editing
- Media management
- Own content management
- Limited system access
Viewer
Section titled “Viewer”- Read-only access
- Content preview
- No editing capabilities
- Stakeholder access
Permission Matrix
Section titled “Permission Matrix”| Operation | Admin | Editor | Viewer |
|---|---|---|---|
| Create Content | ✅ | ✅ | ❌ |
| Edit Own Content | ✅ | ✅ | ❌ |
| Edit All Content | ✅ | ❌ | ❌ |
| Publish Content | ✅ | ✅* | ❌ |
| Delete Content | ✅ | ✅* | ❌ |
| Manage Users | ✅ | ❌ | ❌ |
| System Settings | ✅ | ❌ | ❌ |
*Editor permissions can be configured per installation
Implementation
Section titled “Implementation”// Permission check middlewareconst requirePermission = (permission: Permission) => { return (req: Request, res: Response, next: NextFunction) => { if (!hasPermission(req.user, permission)) { return res.status(403).json({ error: 'Insufficient permissions' }); } next(); };};This section will be expanded with detailed implementation examples.