Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

feat(API): Allow user to be added to and removed from projects #12329

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

MarcL
Copy link
Contributor

@MarcL MarcL commented Dec 20, 2024

Summary

Adds the ability to add and delete users to and from projects using the public API endpoint:

POST /projects/<project-id>/users/
DELETE /projects/<project-id>/users/<user-id>

Also allow the ability to alter user roles in projects.

Note: There were problems getting the integration test server to work when I referenced the projectId.yml schema within the OpenAPI spec rather than inlined it. As we'll be looking to improve the public API at some point in the future, I've moved all the references to inline instead.

Related Linear tickets, Github issues, and Community forum posts

Partially fixes: PAY-1852

Review / Merge checklist

  • PR title and summary are descriptive. (conventions)
  • Docs updated or follow-up ticket created.
  • Tests included.
  • PR Labeled with release/backport (if the PR is an urgent fix that needs to be backported)

Comment on lines +31 to +37
parameters:
- in: path
name: projectId
description: The ID of the project.
required: true
schema:
type: string
Copy link
Contributor Author

@MarcL MarcL Dec 20, 2024

Choose a reason for hiding this comment

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

This was missing the projectId parameter when run through an OpenAPI schema validator.

@n8n-assistant n8n-assistant bot added core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team labels Dec 20, 2024
Copy link

codecov bot commented Dec 20, 2024

Codecov Report

Attention: Patch coverage is 96.15385% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
packages/cli/src/controllers/project.controller.ts 85.71% 1 Missing ⚠️

📢 Thoughts on this report? Let us know!

@MarcL MarcL marked this pull request as draft December 20, 2024 14:30
@MarcL MarcL changed the title feat(API): Allow deletion of user from projects feat(API): Allow user to be added to and removed from projects Dec 20, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
core Enhancement outside /nodes-base and /editor-ui n8n team Authored by the n8n team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant