20 lines
685 B
Markdown
20 lines
685 B
Markdown
## ADDED Requirements
|
|
|
|
### Requirement: Admin login
|
|
The system SHALL provide a login for admin users at `/admin/login`. Only users with `is_admin = true` SHALL be able to access the admin panel.
|
|
|
|
#### Scenario: Admin logs in
|
|
- **WHEN** an admin user logs in with valid credentials
|
|
- **THEN** they reach the admin dashboard
|
|
|
|
#### Scenario: Non-admin blocked
|
|
- **WHEN** an owner (not admin) tries to access the admin panel
|
|
- **THEN** access is denied (403 / redirect)
|
|
|
|
### Requirement: is_admin flag
|
|
The `users` table SHALL have an `is_admin` boolean, default false.
|
|
|
|
#### Scenario: Promote a user
|
|
- **WHEN** an existing user is marked admin
|
|
- **THEN** they can log into the admin panel
|