Skip to content

Allow attendance scanner account to access attendance page and APIs - #30

Merged
fed-tech merged 1 commit into
mainfrom
fix/attendance-scanner
Aug 22, 2026
Merged

Allow attendance scanner account to access attendance page and APIs#30
fed-tech merged 1 commit into
mainfrom
fix/attendance-scanner

Conversation

@hardikguptaofficialgit

Copy link
Copy Markdown
Collaborator

Summary

  • Add shared canMarkAttendance permission for admins and attendance@fedkiit.com
  • Apply the permission to the attendance page and all attendance API routes
  • Redirect the door-duty account from /profile to /profile/attendance after login
  • Centralize the scanner email check in lib/auth/attendance.ts

Test plan

  • Log in as attendance@fedkiit.com and confirm redirect to /profile/attendance
  • Verify /api/form/attendance-events returns 200 (not 403)
  • Scan a valid attendance QR and confirm check-in succeeds
  • Confirm a regular USER account still cannot open /profile/attendance

Made with Cursor

The sidebar showed attendance@fedkiit.com an Attendance link, but the page and APIs required ADMIN access. Add canMarkAttendance permission shared across the route and endpoints, and redirect the scanner account from /profile to /profile/attendance.
Copilot AI lite review requested due to automatic review settings August 22, 2026 03:22

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@vercel

vercel Bot commented Aug 22, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
fedkiit Ready Ready Preview Aug 22, 2026 3:23am

@fed-tech
fed-tech merged commit d61f124 into main Aug 22, 2026
3 checks passed
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.

3 participants