Skip to content

Commit

Permalink
fix: remove the default project group from the organization
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Aug 8, 2023
1 parent 8721b2d commit c916132
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions services/api/src/resources/organization/resolvers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,15 @@ export const removeProjectFromOrganization: ResolverFn = async (
if (projectGroups[g].attributes["type"] == "project-default-group") {
// remove all users from the project default group except the `default-user@project`
await models.GroupModel.removeNonProjectDefaultUsersFromGroup(projectGroups[g], project.name)
// update group
await models.GroupModel.updateGroup({
id: projectGroups[g].id,
name: projectGroups[g].name,
attributes: {
...projectGroups[g].attributes,
"lagoon-organization": ""
}
});
} else {
removeGroups.push(projectGroups[g])
}
Expand Down

0 comments on commit c916132

Please sign in to comment.