Groups & Permissions
Flexible access control with time-based assignments and stackable groups
The groups and permissions system provides granular access control with 21 permissions across 4 categories.
Default Groups
| Group | Price | Duration | Key Features | Stackable |
|---|---|---|---|---|
| Free | €0 | Permanent | View resources only | |
| Basic | €5 | 30 days | Up to 3 VMs, basic management | |
| Pro | €15 | 30 days | Up to 10 VMs, backups, network | |
| Enterprise | €50 | 30 days | Unlimited, full admin access |
Permissions
VM Management (8)
vm.view |
View VMs and containers |
vm.create |
Create new VMs |
vm.edit |
Edit VM settings |
vm.delete |
Delete VMs |
vm.start |
Start VMs |
vm.stop |
Stop VMs |
vm.restart |
Restart VMs |
vm.console |
Access VM console |
Backup Management (4)
backup.view |
View backups |
backup.create |
Create backups |
backup.restore |
Restore from backup |
backup.delete |
Delete backups |
Network Management (3)
network.view |
View network config |
network.manage |
Manage networks |
ip.assign |
Assign IP addresses |
Admin Functions (5)
admin.users |
Manage users |
admin.hosts |
Manage hosts |
admin.groups |
Manage groups |
admin.audit |
View audit logs |
admin.settings |
System settings |
Key Features
Time-Based Access
Groups expire automatically after their duration
Stackable Groups
Extend duration instead of replacing existing access
Credit Purchases
Users can purchase groups with their credit balance
Admin Management
Creating a Group
- Navigate to
/admin/groups - Click "Create Group"
- Fill in:
- Name: Display name
- Description: What the group offers
- Price: Cost in EUR
- Duration: Days (0 = permanent)
- Color: Badge color
- Stackable: Allow duration extension
- Select permissions from the list
- Click "Create Group"
User Group Purchase Flow
- User views available groups
- Checks if they have sufficient credits
- Clicks "Purchase" button
- System validates:
- Credit balance is sufficient
- Group exists and is active
- Credits are deducted
- Group is assigned with expiry date
- Transaction is logged
Database Schema
Tables
groups
Group definitions with pricing and settings
id, name, description, price, duration_days, is_stackable, color, created_at
permissions
Available system permissions
id, name, slug, description, category, created_at
group_permissions
Mapping of permissions to groups
id, group_id, permission_id
user_groups
User group assignments with expiry
id, user_id, group_id, assigned_at, expires_at
API Routes
Admin Routes
GET /admin/groups - List all groups
GET /admin/groups/create - Create form
POST /admin/groups/store - Save new group
GET /admin/groups/edit?id=X - Edit form
POST /admin/groups/update - Update group
POST /admin/groups/delete - Delete group
User Routes
POST /groups/purchase - Purchase group with credits