Chore: Add context to org users (#39526)

* Add context to org users

* Fix go lint

* Roll back xorm refactor

* Use WithTransactionalDbSession

* Update sqlstore.go

Fix typo

* Update org_users.go

Fix typo
This commit is contained in:
idafurjes
2021-09-27 16:43:16 +02:00
committed by GitHub
parent 60f5bceda5
commit 65ebb04cf3
8 changed files with 194 additions and 175 deletions
+2 -2
View File
@@ -233,7 +233,7 @@ func TestUserDataAccess(t *testing.T) {
}
})
err = AddOrgUser(&models.AddOrgUserCommand{
err = ss.AddOrgUser(context.Background(), &models.AddOrgUserCommand{
LoginOrEmail: users[1].Login, Role: models.ROLE_VIEWER,
OrgId: users[0].OrgId, UserId: users[1].Id,
})
@@ -284,7 +284,7 @@ func TestUserDataAccess(t *testing.T) {
IsDisabled: false,
}
})
err = AddOrgUser(&models.AddOrgUserCommand{
err = ss.AddOrgUser(context.Background(), &models.AddOrgUserCommand{
LoginOrEmail: users[1].Login, Role: models.ROLE_VIEWER,
OrgId: users[0].OrgId, UserId: users[1].Id,
})