Unverified Commit c66433bf authored by Sander van Harmelen's avatar Sander van Harmelen Committed by GitHub

Fix issue 230 (#342)

* Fixes #230: add get users (for admins)

see // https://docs.gitlab.com/ce/api/users.html#for-admins

* Fix issue #230

Partially using @michaellihs his earlier work. Updated things to match the currently available docs for this call.
parent 2d8f1727
......@@ -63,7 +63,7 @@ type User struct {
External bool `json:"external"`
}
// UserIdentity represents a user identity
// UserIdentity represents a user identity.
type UserIdentity struct {
Provider string `json:"provider"`
ExternUID string `json:"extern_uid"`
......@@ -74,10 +74,14 @@ type UserIdentity struct {
// GitLab API docs: https://docs.gitlab.com/ce/api/users.html#list-users
type ListUsersOptions struct {
ListOptions
Active *bool `url:"active,omitempty" json:"active,omitempty"`
Blocked *bool `url:"blocked,omitempty" json:"blocked,omitempty"`
Search *string `url:"search,omitempty" json:"search,omitempty"`
Username *string `url:"username,omitempty" json:"username,omitempty"`
Active *bool `url:"active,omitempty" json:"active,omitempty"`
Blocked *bool `url:"blocked,omitempty" json:"blocked,omitempty"`
// The options below are only available for admins.
Search *string `url:"search,omitempty" json:"search,omitempty"`
Username *string `url:"username,omitempty" json:"username,omitempty"`
ExternalUID *string `url:"extern_uid,omitempty" json:"extern_uid,omitempty"`
CreatedBefore *time.Time `url:"created_before,omitempty" json:"created_before,omitempty" `
}
// ListUsers gets a list of users.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment