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

fix: Custom OAuth roles are not correctly synced on user creation #32157

Merged
merged 4 commits into from
Apr 16, 2024

Conversation

matheusbsilva137
Copy link
Member

@matheusbsilva137 matheusbsilva137 commented Apr 9, 2024

Proposed changes (including videos or screenshots)

  • Add role sync step on OAuth user creation.

Issue(s)

Steps to test or reproduce

Configure a custom OAuth service with "Merge Roles from SSO" enabled and add some roles to sync. Use the custom OAuth service to login for the first time with a user that has any of the roles to sync assigned to them.
Current behavior: the roles are only assigned on their second login.
Expected behavior: the user should have their roles synced since the first login, on user creation.

Further comments

SUP-544

Copy link
Contributor

dionisio-bot bot commented Apr 9, 2024

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

Copy link

changeset-bot bot commented Apr 9, 2024

🦋 Changeset detected

Latest commit: 18574f3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 32 packages
Name Type
@rocket.chat/meteor Patch
@rocket.chat/core-typings Patch
@rocket.chat/rest-typings Patch
@rocket.chat/apps Patch
@rocket.chat/core-services Patch
@rocket.chat/cron Patch
@rocket.chat/gazzodown Patch
@rocket.chat/livechat Patch
@rocket.chat/model-typings Patch
@rocket.chat/ui-contexts Patch
@rocket.chat/account-service Patch
@rocket.chat/authorization-service Patch
@rocket.chat/ddp-streamer Patch
@rocket.chat/omnichannel-transcript Patch
@rocket.chat/presence-service Patch
@rocket.chat/queue-worker Patch
@rocket.chat/stream-hub-service Patch
@rocket.chat/api-client Patch
@rocket.chat/license Patch
@rocket.chat/omnichannel-services Patch
@rocket.chat/pdf-worker Patch
@rocket.chat/presence Patch
rocketchat-services Patch
@rocket.chat/ddp-client Patch
@rocket.chat/fuselage-ui-kit Patch
@rocket.chat/models Patch
@rocket.chat/ui-avatar Patch
@rocket.chat/ui-client Patch
@rocket.chat/ui-video-conf Patch
@rocket.chat/uikit-playground Patch
@rocket.chat/web-ui-registration Patch
@rocket.chat/instance-status Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@matheusbsilva137 matheusbsilva137 added this to the 6.8 milestone Apr 9, 2024
Copy link

codecov bot commented Apr 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 55.08%. Comparing base (5000cc8) to head (18574f3).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #32157      +/-   ##
===========================================
+ Coverage    52.78%   55.08%   +2.29%     
===========================================
  Files         2187     2306     +119     
  Lines        48967    50942    +1975     
  Branches      9997    10423     +426     
===========================================
+ Hits         25849    28059    +2210     
+ Misses       20800    20368     -432     
- Partials      2318     2515     +197     
Flag Coverage Δ
e2e 54.24% <ø> (+4.45%) ⬆️
unit 75.30% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@matheusbsilva137 matheusbsilva137 marked this pull request as ready for review April 9, 2024 15:19
Copy link
Contributor

@pierre-lehnen-rc pierre-lehnen-rc left a comment

Choose a reason for hiding this comment

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

Bug was introduced by #27000

We need to take some time to add an OAuth service container to our tests so that we can write tests for those fixes.

@jessicaschelly jessicaschelly added the stat: QA assured Means it has been tested and approved by a company insider label Apr 15, 2024
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Apr 15, 2024
@kodiakhq kodiakhq bot merged commit b586c38 into develop Apr 16, 2024
43 checks passed
@kodiakhq kodiakhq bot deleted the fix/sync-roles-user-creation branch April 16, 2024 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants