summaryrefslogtreecommitdiffstats
path: root/vendor
diff options
context:
space:
mode:
authorEnricoFerro <enrico.ferro@dncsrl.com>2018-08-24 01:59:47 +0200
committertechknowlogick <techknowlogick@users.noreply.github.com>2018-08-23 19:59:47 -0400
commit912953e82a851492c7fd1f2e9c10d3a1955b625c (patch)
tree4ab8ee9e600a691926d3f605ca85360f75e18e9b /vendor
parent127f4770566e09504a3efe4c4282cee049bad0e1 (diff)
downloadgitea-912953e82a851492c7fd1f2e9c10d3a1955b625c.tar.gz
gitea-912953e82a851492c7fd1f2e9c10d3a1955b625c.zip
API /admin/users/{username} missing parameter (#4775)
Diffstat (limited to 'vendor')
-rw-r--r--vendor/code.gitea.io/sdk/gitea/admin_user.go2
-rw-r--r--vendor/code.gitea.io/sdk/gitea/user.go7
2 files changed, 9 insertions, 0 deletions
diff --git a/vendor/code.gitea.io/sdk/gitea/admin_user.go b/vendor/code.gitea.io/sdk/gitea/admin_user.go
index bc0f36994d..4eab8c255f 100644
--- a/vendor/code.gitea.io/sdk/gitea/admin_user.go
+++ b/vendor/code.gitea.io/sdk/gitea/admin_user.go
@@ -51,6 +51,8 @@ type EditUserOption struct {
AllowGitHook *bool `json:"allow_git_hook"`
AllowImportLocal *bool `json:"allow_import_local"`
MaxRepoCreation *int `json:"max_repo_creation"`
+ ProhibitLogin *bool `json:"prohibit_login"`
+ AllowCreateOrganization *bool `json:"allow_create_organization"`
}
// AdminEditUser modify user informations
diff --git a/vendor/code.gitea.io/sdk/gitea/user.go b/vendor/code.gitea.io/sdk/gitea/user.go
index 85160c3fd9..57cf752316 100644
--- a/vendor/code.gitea.io/sdk/gitea/user.go
+++ b/vendor/code.gitea.io/sdk/gitea/user.go
@@ -42,3 +42,10 @@ func (c *Client) GetUserInfo(user string) (*User, error) {
err := c.getParsedResponse("GET", fmt.Sprintf("/users/%s", user), nil, nil, u)
return u, err
}
+
+// GetMyUserInfo get user info of current user
+func (c *Client) GetMyUserInfo() (*User, error) {
+ u := new(User)
+ err := c.getParsedResponse("GET", "/user", nil, nil, u)
+ return u, err
+}