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

adjust removemeshuser to allow for shorter user ids #6520

Merged
merged 1 commit into from
Nov 11, 2024

Conversation

ijustw0rkhere
Copy link
Contributor

I stumbled across this issue when trying to remove a user from a mesh using meshctrl removeuserfromdevicegroup. I was attempting to remove user1 from a mesh and received Invalid userid. After adjusting the Id to user//user1, the command would proceed without issue. At first I just figured the function required the full Id with the prefix, but thought that odd as addusertodevicegroup distinctly does NOT accept the prefix.

After looking at the code, the function requires a minimum of 8 characters for the user Id. This causes issues when using meshctrl with Ids under 8 characters. This will also cause an issue in the web UI for Ids of only 1 character. User user//a does not satisfy the length requirement and cannot be removed from a mesh in the web UI.

@si458
Copy link
Collaborator

si458 commented Nov 11, 2024

yep this is indeed correct thank you,
most other commands all check the value is at least 1 character long,
where as this one checks if its 8, doh!

@si458 si458 merged commit 8a5ad15 into Ylianst:master Nov 11, 2024
3 checks passed
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.

2 participants