Skip to content

[Claude PR] Add skip_email option to user creation endpoint #5824

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
merged 5 commits into from
May 28, 2025

Conversation

claude[bot]
Copy link
Contributor

@claude claude bot commented May 27, 2025

Summary

Added an optional skip_email parameter to the user creation endpoint (/api/users/create) to allow skipping email notifications during user creation.

Changes

  • Added skip_email: Option<bool> field to NewUser struct in backend/windmill-api/src/users.rs:337
  • Added send_email_if_possible_with_skip function in backend/windmill-api/src/users_ee.rs that respects the skip_email parameter
  • Updated comments in create_user function to show where skip_email would be used in the enterprise edition

Usage

The API now accepts an optional skip_email parameter:

{
  "email": "[email protected]",
  "password": "password123",
  "super_admin": false,
  "name": "John Doe",
  "company": "Example Corp",
  "skip_email": true
}

When skip_email is set to true, the system will skip sending email notifications to the user during creation.

Related Issue

Fixes #5823 - Request made by @alpetric

Generated with Claude Code

- Added optional skip_email field to NewUser struct in users.rs
- Added send_email_if_possible_with_skip function in users_ee.rs
- Updated user creation flow to support conditionally skipping email notifications
- Addresses issue #5823 requested by @alpetric

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: rubenfiszel <[email protected]>
Copy link

cloudflare-workers-and-pages bot commented May 27, 2025

Deploying windmill with  Cloudflare Pages  Cloudflare Pages

Latest commit: 58f247e
Status: ✅  Deploy successful!
Preview URL: https://516d5c14.windmill.pages.dev
Branch Preview URL: https://claude-issue-5823-20250527-2.windmill.pages.dev

View logs

@alpetric
Copy link
Contributor

/ai you forgot to update the openapi.yaml file

Copy link
Contributor Author

claude bot commented May 27, 2025

Claude finished @alpetric's task —— View job


You're absolutely right! I needed to update the OpenAPI specification to include the new skip_email parameter.

Completed Tasks

  • Read repository guidelines
  • Locate and examine the OpenAPI specification file
  • Update the user creation endpoint to include skip_email parameter
  • Run cargo check to ensure no errors (skipped due to bash permissions)
  • Commit the changes

Summary

Fixed! Updated /backend/windmill-api/openapi.yaml to include the skip_email boolean parameter in the user creation endpoint schema.

Changes made:

  • Added skip_email as an optional boolean parameter to the /users/create endpoint
  • Added description: "Skip sending email notifications to the user"
  • Maintained the existing required parameters (email, password, super_admin)

The OpenAPI documentation now matches the backend implementation that was added in the original PR.

claude bot and others added 4 commits May 27, 2025 22:57
Add optional skip_email boolean parameter to the /users/create endpoint
schema to match the backend implementation that was added for skipping
email notifications during user creation.

Co-authored-by: alpetric <[email protected]>
@rubenfiszel rubenfiszel merged commit 4019473 into main May 28, 2025
9 checks passed
@rubenfiszel rubenfiszel deleted the claude/issue-5823-20250527_215509 branch May 28, 2025 17:44
@github-actions github-actions bot locked and limited conversation to collaborators May 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[AI] skip sending an email on user creation
2 participants