feat: Add organizations endpoint for users (#50)

* feat: Add organizations endpoint for users

This moves the /user endpoint to /users/me instead. This
will reduce code duplication.

This adds /users/<name>/organizations to list organizations
a user has access to. It doesn't contain the permissions a
user has over the organizations, but that will come in a future
contribution.

* Fix requested changes

* Fix tests

* Fix timeout

* Add test for UserOrgs

* Add test for userparam getting

* Add test for NoUser
This commit is contained in:
Kyle Carberry
2022-01-22 23:58:10 -06:00
committed by GitHub
parent 50d8151995
commit 8be245616a
20 changed files with 597 additions and 244 deletions

View File

@ -13,5 +13,6 @@ func TestMain(m *testing.M) {
}
func TestNew(t *testing.T) {
_ = coderdtest.New(t)
server := coderdtest.New(t)
_ = server.RandomInitialUser(t)
}