mirror of
https://github.com/coder/coder.git
synced 2025-07-12 00:14:10 +00:00
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:
@ -8,10 +8,14 @@ import (
|
||||
|
||||
type querier interface {
|
||||
GetAPIKeyByID(ctx context.Context, id string) (APIKey, error)
|
||||
GetOrganizationByName(ctx context.Context, name string) (Organization, error)
|
||||
GetOrganizationsByUserID(ctx context.Context, userID string) ([]Organization, error)
|
||||
GetUserByEmailOrUsername(ctx context.Context, arg GetUserByEmailOrUsernameParams) (User, error)
|
||||
GetUserByID(ctx context.Context, id string) (User, error)
|
||||
GetUserCount(ctx context.Context) (int64, error)
|
||||
InsertAPIKey(ctx context.Context, arg InsertAPIKeyParams) (APIKey, error)
|
||||
InsertOrganization(ctx context.Context, arg InsertOrganizationParams) (Organization, error)
|
||||
InsertOrganizationMember(ctx context.Context, arg InsertOrganizationMemberParams) (OrganizationMember, error)
|
||||
InsertUser(ctx context.Context, arg InsertUserParams) (User, error)
|
||||
UpdateAPIKeyByID(ctx context.Context, arg UpdateAPIKeyByIDParams) error
|
||||
}
|
||||
|
Reference in New Issue
Block a user