Skip to content

feat: add ConvertUserLoginType func to codersdk #17784

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

Merged

Conversation

betterlmy
Copy link
Contributor

🚀 New Feature

Added ConvertUserLoginType(ctx, user, req) method to support converting the login type for a specified user.

📌 Background

The existing ConvertLoginType method only supports converting the current user's login type (via the /api/v2/users/me/convert-login endpoint).

In our use case, we needed to convert the login type for other users programmatically, which the SDK did not support.

This new method constructs the endpoint dynamically using the provided username, enabling conversion for any user.

✅ Compatibility

This is an additive change and does not modify any existing functionality.

The original ConvertLoginType remains unchanged.

@cdr-bot cdr-bot bot added the community Pull Requests and issues created by the community. label May 13, 2025
Copy link

github-actions bot commented May 13, 2025

All contributors have signed the CLA ✍️ ✅
Posted by the CLA Assistant Lite bot.

@betterlmy betterlmy force-pushed the feature/add-ConvertUserLoginType-function branch from 2f29b2d to 955b588 Compare May 13, 2025 09:38
@betterlmy
Copy link
Contributor Author

I have read the CLA Document and I hereby sign the CLA

cdrci2 added a commit to coder/cla that referenced this pull request May 13, 2025
@betterlmy
Copy link
Contributor Author

recheck

@github-actions github-actions bot added the stale This issue is like stale bread. label May 21, 2025
@matifali matifali requested review from Emyrk and mafredri May 21, 2025 13:15
@github-actions github-actions bot removed the stale This issue is like stale bread. label May 22, 2025
@betterlmy betterlmy force-pushed the feature/add-ConvertUserLoginType-function branch from 955b588 to fb695d6 Compare May 22, 2025 05:57
@betterlmy betterlmy requested a review from Emyrk May 22, 2025 06:02
@betterlmy
Copy link
Contributor Author

Hi @Emyrk @mafredri @matifali

Could one of you please take a look at this PR when you have a moment?

Thanks!

@Emyrk Emyrk merged commit 71a647b into coder:main May 27, 2025
29 checks passed
@github-actions github-actions bot locked and limited conversation to collaborators May 27, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
community Pull Requests and issues created by the community.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants