Skip to content

Conversation

@Chahine7
Copy link

Implemented Authentication & User-Specific Resumes

Changes

  • Authentication: Integrated Laravel Breeze for login, registration, and logout.
  • User-Specific Resumes: Implemented Eloquent relationships to associate each resume with a user.
  • Access Control via Middleware:
    • EnsureUserHasNoResume: Blocks users from creating multiple resumes; redirects to index with an error message.
    • AuthorizeResourceAccess: Prevents users from accessing resumes they don’t own (unless admin).
    • AdminMiddleware: Grants admin access to view all resumes; unauthorized users get a 403 error.
  • UI Restriction: The "Add New" button is hidden once a user creates a resume.
  • Direct URL Restriction: Trying to access /create after submitting a resume redirects with an error.
  • Unauthorized Access Handling: Users cannot access other people's resumes (403 error).

Bonus Features

  • 🔹 Admin Role: Allows admins to view and manage all resumes.
  • 🔹 Basic Tests: Added authentication and access control tests.

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.

1 participant