-
Notifications
You must be signed in to change notification settings - Fork 255
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unverified role from discord on /verify #2156
Remove unverified role from discord on /verify #2156
Conversation
* chore: add 32 character limit for username * chore: fix failing test Co-authored-by: Amit Prakash <[email protected]>
Dev to Main Sync
…or migration (Real-Dev-Squad#2134) * fix: username generation for new user * chore: add username function to nee file to avoid circular dependency * chore: add test for username utils * chore: fix validator and write test for it * chore: remove .only from test and fix count functionality * chore: fix format username function and write it's test * chore: add test case for model function * chore: add more test for format uername function * chore: fix model tests * chore: fix format function logic and it's test * chore: fix failing test * chore: fix generate username function * chore: move generate username to user service
…ggled off (Real-Dev-Squad#2132) * Revoke roles temporarily based on revoked_roles * Extended validator PATCH \users\self * UpdateUser Set revoked_roles in user object minor changes: - fix typo in middlewares/validator to allow only member and super_user role * Test coverage for the changes * Modify Response * Changes Property name from revoked_roles to disabled_roles * refactored controller/users.js * [refactor] controller logic & test/unit/model * [fix] updateSelf developers can only updated disabled role property udpateSelf funciton update data of those people people who are either new or not in discord, in order case the user of the feature are those who are in the discord as well as have their userDetailsCompelete, Before, users who lied in this category couldn't update their user profile for that they need profile service if someone falls in this category, he can only update the disabled_roles property, for other properties such people need to use profile services * [chore-Real-Dev-Squad#2132] Add Test Case & refactor users model * [refactor] remove redundent reassignment
* Revoke roles temporarily based on revoked_roles * Extended validator PATCH \users\self * UpdateUser Set revoked_roles in user object minor changes: - fix typo in middlewares/validator to allow only member and super_user role * Test coverage for the changes * Modify Response * Changes Property name from revoked_roles to disabled_roles * refactored controller/users.js * [refactor] controller logic & test/unit/model * [fix] updateSelf developers can only updated disabled role property udpateSelf funciton update data of those people people who are either new or not in discord, in order case the user of the feature are those who are in the discord as well as have their userDetailsCompelete, Before, users who lied in this category couldn't update their user profile for that they need profile service if someone falls in this category, he can only update the disabled_roles property, for other properties such people need to use profile services * [chore-Real-Dev-Squad#2132] Add Test Case & refactor users model * [refactor] remove redundent reassignment * added dev flag and fallback if discord response isn't as expected * fix lint error --------- Co-authored-by: Amit Prakash <[email protected]> Co-authored-by: Achintya Chatterjee <[email protected]>
Dev to Main sync
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
where is tests ..?
@@ -40,6 +43,38 @@ const getExternalAccountData = async (req, res) => { | |||
return res.boom.unauthorized("Token Expired. Please generate it again"); | |||
} | |||
|
|||
const { id: userId, roles } = req.userData; | |||
|
|||
if (!roles.in_discord) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- can we move this inside a function and return the data required here? it will make it easy to test the logic that's written here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay I'll do that
Dev to Main Sync
…4-develop Revert "Dev to Main Sync"
Co-authored-by: Vinit khandal <[email protected]>
* chore: make firstname and lastname to lowercase * chore: remove type check
Dev to Main Sync
* added condition to prevent mavens being added to idle,idle7d * edited test for group-idle-7d and added test for group-idle * resolving build error * resolving test errors * fixing tests * fixed the tests * added model tests * added line break * resolving Tejas's comments * fixed model function * added feature flag * adding feature flag * edited tests * fixing unit * added FF --------- Co-authored-by: Amit Prakash <[email protected]>
Instead of putting a screenshot of no. of test passed. Put in the screenshot of the test coverage you added |
Dev to Main sync
* chore: remove feature flag for GET /logs API * chore: remove dev FF from GET /logs integration tests
* chore: remove feature flag for GET /requests API * chore: remove empty query from GET /requests middleware test
…Real-Dev-Squad#2153) * chore: remove feature flag for POST /requests API * chore: remove feature flag for PUT /requests/:id API * chore: remove dev query param from request query type * chore: remove empty query from POST /requests API middleware test
* enhancement: adding remaining applications count and removing View Details button * added integration test * Revert "added integration test" This reverts commit e90cebc. * added integration test * removed comments * added changes as per the comment * Update application-validator.test.ts * Update applications.ts * Update application-validator.test.ts * Update application.test.ts --------- Co-authored-by: Vinit khandal <[email protected]>
…ationInProfileDiffsAPI Added Pagination in profile diffs API
…ev-Squad#2185) Co-authored-by: Vinit khandal <[email protected]>
…bhan-sundar-goutam/rds-website-backend into update-/verify-functionality
Date: 14/09/24
Developer Name: Shobhan Sundar Goutam
Issue Ticket Number
Closes first issue - Real-Dev-Squad/discord-slash-commands#234
Description
This PR fixes the first issue which is removing unverified role from discord when user runs /verify and connects their RDS Discord
Documentation Updated?
Under Feature Flag
Database Changes
Breaking Changes
Development Tested?
Screenshots
Screenshot 1
discord-verify.mp4
Test Coverage
Screenshot 1