Skip to content
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

feat(core): added a new endpoint to replace user roles #3203

Merged
merged 2 commits into from
Feb 24, 2023
Merged

feat(core): added a new endpoint to replace user roles #3203

merged 2 commits into from
Feb 24, 2023

Conversation

muratgozel
Copy link
Contributor

@muratgozel muratgozel commented Feb 23, 2023

Summary

The api endpoint POST /api/users/:userId/roles accepts roleIds[] to assign roles to the user. As relevant to my use case, I implemented a PUT /api/users/:userId/roles to replace user's roles. Hoping to see this commit merged as I guess it might find its place in other projects as well.

Refer to here, Discord thread for origin of this:
https://discord.com/channels/965845662535147551/1077713036485349587

Testing

I've created relevant tests that you can see in committed files and they are part of usual test process.

@github-actions
Copy link

github-actions bot commented Feb 23, 2023

COMPARE TO master

Total Size Diff 📈 +1.91 KB

Diff by File
Name Diff
packages/core/src/mocks/index.ts 📈 +270 Bytes
packages/core/src/routes/admin-user-role.test.ts 📈 +524 Bytes
packages/core/src/routes/admin-user-role.ts 📈 +1.14 KB

@uffizzi-cloud
Copy link

uffizzi-cloud bot commented Feb 23, 2023

Uffizzi Ephemeral Environment deployment-17205

⌚ Updated Feb 23, 2023, 11:57 UTC

☁️ https://pr-3203-deployment-17205-logto.app.uffizzi.com

📄 View Application Logs etc.

What is Uffizzi? Learn more

Copy link
Member

@charIeszhao charIeszhao left a comment

Choose a reason for hiding this comment

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

Looks good to me

@charIeszhao charIeszhao merged commit 1db6177 into logto-io:master Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants