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

configstore/gateway: move projectgroups/projects between users/orgs #30

Open
sgotti opened this issue Jul 8, 2019 · 2 comments
Open
Labels
enhancement New feature or request

Comments

@sgotti
Copy link
Member

sgotti commented Jul 8, 2019

No description provided.

@sgotti sgotti added the enhancement New feature or request label Jul 8, 2019
@alessandro-sorint
Copy link
Contributor

alessandro-sorint commented Nov 30, 2021

I are working on this feature for the backend.
The idea in general is this: the user go to the project page, click a button for move the project, that open a new page.
Here the frontend call an api that get the list of user/org projectgroups and show they with radio buttons.
The user select a radio button and confirm, the frontend call an api for modify the projectref of the progect.
The user can select a different organizazion or move the project between user and organization.

For moving the project we can user the api PUT /projects/{projectref} that already exists
es. PUT https://agoladev.sorintdev.it/api/v1alpha/projects/org%2FTest%2Fproject1
body: {"parent_ref": "user/username1/userprojectgroup"}

For getting the list of projectgroups I would like to create this api GET /user/projectgroups?grouptype
es. /user/projectgroups?grouptype=user%2Corg
The parameter grouptype is an array, we can use "user" and/or "org" value.
With user value the api return the list of user projectgroups recursively
With org value the api return the list of all organization projectgroups where the user is owner
The default value for grouptype empty is "user"

We need the pull request #280 to get the list of user organizations for the api /user/projectgroups

@sgotti
Copy link
Member Author

sgotti commented Feb 28, 2022

For moving the project we can user the api PUT /projects/{projectref} that already exists es. PUT https://agoladev.sorintdev.it/api/v1alpha/projects/org%2FTest%2Fproject1 body: {"parent_ref": "user/username1/userprojectgroup"}

Since this can be a move between different with the actual datamanager and related locking implementation it'll be quite cumbersome to properly handle locking. So let's wait when datamanager will be removed.

For getting the list of projectgroups I would like to create this api GET /user/projectgroups?grouptype
es. /user/projectgroups?grouptype=user%2Corg
The parameter grouptype is an array, we can use "user" and/or "org" value.
With user value the api return the list of user projectgroups recursively
With org value the api return the list of all organization projectgroups where the user is owner
The default value for grouptype empty is "user"

The user is already able to navigate between projectgroups/projects. I don't see the need for this new api that will require e recursive fetching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants