Skip to content

Rename User model to Admin and web guard to admin guard #129

@smnmsr

Description

@smnmsr

Context

Current auth setup uses App\\Models\\User for admin users and auth:web middleware for admin routes. This works but naming is confusing now that auth:external exists.

Goal

Rename admin auth surface to explicit admin naming:

  • App\\Models\\User -> App\\Models\\Admin
  • auth:web guard -> auth:admin
  • Admin routes use auth:admin

Scope

  • Add admin guard/provider in config/auth.php
  • Migrate admin routes and tests from auth:web to auth:admin
  • Update factories, notifications, type hints, policies, and references
  • Keep compatibility strategy for transition (temporary alias or phased migration)

Acceptance Criteria

  • Admin authentication works unchanged for users
  • All admin routes protected by auth:admin
  • External routes stay on auth:external
  • Test suite green

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions