1
0
Fork 0
mirror of synced 2024-10-02 02:07:04 +13:00

Update teamInternalId when updating project team

This is important because when an organization is deleted, projects are
fetched by the teamInternalId and if the teamInternalId is not updated
when the project team is updated, the project will be deleted if the
previous organization is deleted.
This commit is contained in:
Steven Nguyen 2023-10-12 17:03:45 -07:00
parent 6f39c1ddc9
commit 3bb22c38cc
No known key found for this signature in database

View file

@ -483,6 +483,7 @@ App::patch('/v1/projects/:projectId/team')
$project = $dbForConsole->updateDocument('projects', $project->getId(), $project
->setAttribute('teamId', $teamId)
->setAttribute('teamInternalId', $team->getInternalId())
->setAttribute('$permissions', [
Permission::read(Role::team(ID::custom($teamId))),
Permission::update(Role::team(ID::custom($teamId), 'owner')),