-
Notifications
You must be signed in to change notification settings - Fork 1.3k
[server] added UpdateTeam #15749
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
[server] added UpdateTeam #15749
Conversation
affae41
to
da72dae
Compare
started the job as gitpod-build-sefftinge-allow-users-to-rename-5067.4 because the annotations in the pull request description changed |
/hold |
@@ -122,6 +122,18 @@ export class TeamDBImpl implements TeamDB { | |||
return soleOwnedTeams; | |||
} | |||
|
|||
public async updateTeam(team: Partial<Team>): Promise<Team> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The signature here is possibly misleading. You can only update the team name, but you can pass in the whole team. Does it make sense to be explicit with which fields are acceptable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to also check the team name is not empty? Currently I could set the name to empty
throw new ResponseError(ErrorCodes.NOT_FOUND, `Team ${team.id} does not exist`); | ||
} | ||
const members = await this.teamDB.findMembersByTeam(teamId); | ||
await this.guardAccess({ kind: "team", subject: existingTeam, members }, "update"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For others reading this, the update action is only allowed if you're the team owner.
da72dae
to
1c90cb2
Compare
Description
Adds an updateTeam call to the server component.
Related Issue(s)
See #5067
How to test
Release Notes
Documentation
Werft options:
If enabled this will build
install/preview
Valid options are
all
,workspace
,webapp
,ide
,jetbrains
,vscode
,ssh