feat: implement user authentication models, serializers, and registra…#231
Conversation
…tion logic for students, supervisors, and admins
ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Free Run ID: 📒 Files selected for processing (7)
💤 Files with no reviewable changes (1)
Summary by CodeRabbitRelease Notes
WalkthroughThis pull request adds college-based access control to supervisor application workflows. It updates model ID fields to use Django's AutoField, adds a college relationship to SupervisorApplication, and implements college-scoped filtering in approval and listing endpoints alongside existing institution-level controls. ChangesCollege-Scoped Supervisor Applications
Sequence DiagramsequenceDiagram
actor Admin as Admin User
participant View as SupervisorApprovalView
participant DB as Database
Admin->>View: POST approve supervisor application
activate View
Note over View: Retrieve admin's StaffProfile
View->>DB: Query StaffProfiles for admin
DB-->>View: StaffProfile with department & college
Note over View: Check institution scope
View->>DB: Verify application institution match
DB-->>View: Institution OK
Note over View: Check college scope (new)
View->>DB: Extract admin_college_id from StaffProfile
alt College present on application
View->>DB: Verify application.college_id == admin_college_id
DB-->>View: College match verified
else College not required
View->>View: Proceed without college check
end
alt Permission granted
View->>DB: Update application.status = "approved"
DB-->>View: Success
View-->>Admin: 200 OK
else Permission denied
View-->>Admin: 403 Forbidden
end
deactivate View
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
Note 🎁 Summarized by CodeRabbit FreeYour organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login. Review rate limit: 2/3 reviews remaining, refill in 20 minutes. Comment |
Deploying logify-frontend with
|
| Latest commit: |
6e69972
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://b4f60834.logify-frontend.pages.dev |
| Branch Preview URL: | https://chore-clean-internshipadmin.logify-frontend.pages.dev |
…tion logic for students, supervisors, and admins