Skip to content

Commit

Permalink
ID-1369 Repair cloud access followup: fix swagger (#1529)
Browse files Browse the repository at this point in the history
* ID-1369 Repair cloud access followup: fix swagger

* ID-1369 Repair cloud access followup, fix swagger
  • Loading branch information
Ghost-in-a-Jar authored Aug 29, 2024
1 parent 83228eb commit 0bf45d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/main/resources/swagger/api-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ paths:
schema:
$ref: '#/components/schemas/ErrorReport'
/api/admin/v2/user/{userId}/repairCloudAccess:
get:
put:
tags:
- Admin
summary: Ensures that a user's proxy group exists and that it is added to any google groups that it should be in.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,7 @@ class UserService(
case Some(user) =>
for {
_ <- cloudExtensions.onUserCreate(user, samRequestContext)
_ <- cloudExtensions.onUserEnable(user, samRequestContext)
groups <- directoryDAO.listUserDirectMemberships(user.id, samRequestContext)
_ <- cloudExtensions.onGroupUpdate(groups, Set(user.id), samRequestContext)
} yield IO.pure(())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -747,8 +747,8 @@ class OldUserServiceSpec(_system: ActorSystem)
// Run test
service.repairCloudAccess(invitedUserId, samRequestContext).unsafeRunSync()

verify(googleExtensions).onUserCreate(SamUser(invitedUserId, registeringUser.googleSubjectId, inviteeEmail, None, true), samRequestContext)

verify(googleExtensions).onUserCreate(updatedUserInPostgres.get, samRequestContext)
verify(googleExtensions).onUserEnable(updatedUserInPostgres.get, samRequestContext)
verify(googleExtensions).onGroupUpdate(Seq(allUsersGroup.id), Set(invitedUserId), samRequestContext)
}
}

0 comments on commit 0bf45d3

Please sign in to comment.