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(workspaces): display warning if workspace has no authStrategies #11679

Merged
merged 2 commits into from
Mar 30, 2022

Conversation

laurentlp
Copy link
Contributor

This PR fixes an issue or rather recommends the user to add authStrategies to its workspaces when none is set.

The result of having no authentication strategy set in a workspace is that you won't be able to list available users for the workspace. Meaning that when adding a user to the workspace, you won't be provided suggestions of already existing users and get an error if you try to re-create it.

Closes botpress/v12#1609

@laurentlp laurentlp requested a review from sebburon March 30, 2022 20:01
@linear
Copy link

linear bot commented Mar 30, 2022

DEV-2362 (BUG) Cannot convert a user to admin role if they existed as chat user (usually with some non-default auth) (botpress/botpress botpress/v12#1609)

Describe the bug
The bug has different use cases where it happens:
The first is when the user has talked to the bot and authenticated with SSO, and then they cannot be added as an admin. The error shows the user exists.
The second is when the user was an admin and also a chat user, and they cannot access the privileges of admin because Botpress thinks they are chat users. (Usually when in the database the chat user entity goes before the admin entity)

To Reproduce
Steps to reproduce the behavior:

  1. Have SSO set up for the users
  2. Talk to the bot firstly
  3. Try to add the user with that email as an admin
  4. See an error that user exists, but not listed with other users/admins

Expected behavior
Chat user entity should be ignored when adding a user as an admin. And when logging in to the system, the entity of admin should be taken instead of chat user

Screenshots
If applicable, add screenshots to help explain your problem.

Environment (please complete the following information):

  • Server is hosted, Database used is Postgres

Additional context
Add any other context about the problem here.

botpress/borpress botpress/v12#1609 by @ sadda11asm

Copy link
Contributor

@sebburon sebburon left a comment

Choose a reason for hiding this comment

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

Looking good
Thanks !!!

@laurentlp laurentlp merged commit 52c4e95 into master Mar 30, 2022
@laurentlp laurentlp deleted the dev-2362-bug-cannot-convert-a-user-to-admin-role branch March 30, 2022 20:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot convert a user to admin role if they existed as chat user (usually with some non-default auth)
2 participants