Fix the role not being present on user session#996
Fix the role not being present on user session#996NiallJoeMaher merged 1 commit intocodu-code:developfrom
Conversation
|
@NiallJoeMaher is attempting to deploy a commit to the Codú Team on Vercel. A member of the Team first needs to authorize it. |
WalkthroughThe recent changes include modifications to the date format in the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant AdminRouter
participant Auth
User->>AdminRouter: Create new object
AdminRouter->>AdminRouter: Set createdAt to ISO 8601 string
AdminRouter-->>User: Return success response
User->>Auth: Log in
Auth->>Auth: Retrieve user data
Auth-->>User: Return session with user role
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (invoked as PR comments)
Additionally, you can add CodeRabbit Configuration File (
|
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
Actionable comments posted: 0
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- server/api/router/admin.ts (1 hunks)
- server/auth.ts (3 hunks)
Additional comments not posted (3)
server/api/router/admin.ts (1)
31-31: Approved change to date format.Converting the
createdAtdate to an ISO 8601 string is a good practice for standardizing date formats across different systems. Ensure that all systems consuming this date are capable of handling the ISO format.server/auth.ts (2)
39-39: Approved addition ofusersTableconfiguration.Explicitly specifying the
usersTablein theDrizzleAdapterconfiguration enhances clarity and ensures that the correct table is used for user management.
61-61: Approved addition ofroleto session user object.Adding the
roleproperty to thesession.userobject is a significant enhancement for role-based access control within the application. Ensure that role checks are implemented consistently throughout the application.
✨ Codu Pull Request 💻
Pull Request details
Any Breaking changes