refactor: Update authorization service to accept IUser type #38622
refactor: Update authorization service to accept IUser type #38622
Conversation
|
Looks like this PR is not ready to merge, because of the following issues:
Please fix the issues and try again If you have any trouble, please check the PR guidelines |
|
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #38622 +/- ##
===========================================
+ Coverage 70.58% 70.59% +0.01%
===========================================
Files 3189 3189
Lines 112703 112703
Branches 20429 20438 +9
===========================================
+ Hits 79547 79568 +21
+ Misses 31096 31074 -22
- Partials 2060 2061 +1
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
…parameters Modified the Authorization class methods to accept IUser type in place of string for userId parameters. Updated the IAuthorization interface to reflect these changes, marking the previous string-based methods as deprecated.
Refactored the message permission validation functions to accept IUser type directly, enhancing type safety and consistency. Adjusted related functions to streamline user parameter handling and removed deprecated uid and username options. Updated the IAuthorization interface to reflect these changes.
Refactored the executeSendMessage function to accept IUser type instead of IUser['_id'], improving type safety. Adjusted related method calls in the chat API to utilize the updated user parameter handling.
Modified the broadcast call in the executeSendMessage function to utilize user._id instead of uid, enhancing clarity and consistency in user parameter handling.
13411a4 to
b885b05
Compare
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments