Skip to content

feat: add admin management CRUD with roles, permissions & secure seeder - #12

Draft
cto-new[bot] wants to merge 3 commits into
mainfrom
feature/admin-management-crud-permissions-prevent-self-edit-safe-seed
Draft

cto-new[bot] wants to merge 3 commits into
mainfrom
feature/admin-management-crud-permissions-prevent-self-edit-safe-seed

Conversation

@cto-new

@cto-new cto-new Bot commented Oct 23, 2025

Copy link
Copy Markdown

Summary

Implements admin management functionality with create, edit, list, and delete, role control, and improved seeding and policies for robust admin security.

Details

  • Adds AdminController for CRUD operations on user accounts (admin/student roles)
  • Admins can assign role (admin/student) when creating or editing users
  • Policies restrict self-edit, self-delete, and enforce admin-only access to management
  • Navigation updated for admin management entry
  • Improved seeder with strong randomized password if ADMIN_DEFAULT_PASSWORD is not set
  • Tests to validate all required CRUD and policy scenarios
  • Updates README with seed and credentials handling improvements

Warning: Task VM test is not passing, cto.new will perform much better if you fix the setup

cto-new Bot added 3 commits October 22, 2025 09:57
…paration

Implements session-based authentication using Laravel Breeze, with custom role management and middleware to restrict access to admin and student dashboards. Adds database migration and seeding for user roles, distinct dashboard routes, and login handling to redirect based on user role. Updates feature tests for authentication, registration, and authorization. Improves the login UI with guidance and documents setup and usage in README.

This enables clean separation of permissions for students and admins and provides a scalable template for advanced RBAC or future role additions. Existing users will default to the student role unless otherwise modified.
… prevention

Implements a full administrator management system, allowing CRUD
operations on admin user accounts with explicit role selection.
Adds robust policy controls to prevent administrators from editing or
deleting their own accounts, minimizing risk of lockout. Admin list
shows all admin users with roles, and role changes are enforced
during edit. Seeders securely create initial admin and student users,
with configurable or random passwords for enhanced security.

Includes comprehensive tests covering all admin management and
permission scenarios, ensuring correct enforcement and preventing
privilege escalation.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants