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

Cannot add user to project #784

Closed
Pacman99 opened this issue Apr 20, 2023 · 7 comments · Fixed by #785
Closed

Cannot add user to project #784

Pacman99 opened this issue Apr 20, 2023 · 7 comments · Fixed by #785
Labels
kind/bug Something isn't working

Comments

@Pacman99
Copy link

Describe the bug

If I copy the platform generated username for a SSO user, and try and use the "add member" button in a project to add the user I get the following error:
Key: 'AddProjectUserRequest.UserName' Error:Field validation for 'UserName' failed on the 'checkname' tag

I noticed that the html of the page has a maxLength key for the input field at 32, but the generated usernames are longer than 32 digits. So I removed that field and tried again but I get the same error.

To Reproduce

Steps to reproduce the behavior:

  1. Get userid of a generated user from SSO
  2. Go to a project's members page and click "add member"
  3. paste the username (or inspect, remove maxLength field and paste username)
  4. select a role
  5. click create

Expected behavior
The user should be added as a member of the project

Screenshots

KubeVela Version
velaux version: v1.8.0
vela-core version: v1.7.5

Additional context

@Pacman99 Pacman99 added the kind/bug Something isn't working label Apr 20, 2023
@barnettZQG
Copy link
Collaborator

Yes, the name max length is 32. This is the validation in the API server.

@Pacman99
Copy link
Author

So then how do I have users with names that are over 32? These users ids were automatically made by velaux when logging in with SSO, so I had no choice in their length.

@barnettZQG
Copy link
Collaborator

@Pacman99 What connector do you configure? VelaUX generates the user name by the sub of id-token

@Pacman99
Copy link
Author

I'm using the google connector

@Pacman99
Copy link
Author

Thanks for the fix! When will an image with the fix be pushed?

@barnettZQG
Copy link
Collaborator

Thanks for the fix! When will an image with the fix be pushed?

1.8.1 has already been released.

@Pacman99
Copy link
Author

amazing thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants