G-Node / tonic

Framework for building services that interact with GIN
BSD 3-Clause "New" or "Revised" License
6 stars 4 forks source link

Labproject: Team specification and user membership #24

Closed achilleas-k closed 3 years ago

achilleas-k commented 3 years ago

Followup to PR #22.

In its current state, the labproject service creates a team with the same name as the project and adds the creating user to the team. If we let users specify the name of the team, we have to consider what happens when the team already exists.

Options:

  1. The team must be new (not already exist). If the team already exists, team creation fails. This is the same process as the current one with the added feature that the team can have a different name from the project.
  2. If the specified team doesn't exist, it is created; if it does exist, the project repos are added to the existing team.

Option 2 raises a question: how do we handle the user? Do we add them to the team? That means that a user can basically add themselves to existing teams, which we probably don't want. So should we check if the user is already a member of the team and has write access? That would make more sense.

I'm mostly wondering how @jcolomb thinks about this. Should teams have multiple projects?

jcolomb commented 3 years ago

teams will probably have multiple projects, sometimes it will indeed be better to start a new project than adding a submodule. At least the option should be open. (one could also think of a lab that works openly and want to share everything between everybody, and do have only one team)

Project name must be new (there probably is already a check for that ?), so team name in this workflow must be new (?). (what if a repository was deleted? is the team deleted too?)

I would like to add the option to create a repo in an existing team, from a dropdown menu of teams the user is part of, if none is specified, a new team is created. Would this solve the problems stated above?


input organisation, repo name, descritpion, and optionally team to add,

achilleas-k commented 3 years ago

Got it. Coming soon.