Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Commit 422568a

Browse files
jolheiserzeripath
authored andcommitted
Add MustChangePassword field to add/edit user for API (#148)
Added JetBrains folder to .gitignore Signed-off-by: jolheiser <[email protected]>
1 parent 62c4fab commit 422568a

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

Diff for: .gitignore

+3
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,6 @@ _testmain.go
2424
*.prof
2525

2626
coverage.out
27+
28+
# JetBrains
29+
.idea

Diff for: gitea/admin_user.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// Copyright 2015 The Gogs Authors. All rights reserved.
2+
// Copyright 2019 The Gitea Authors. All rights reserved.
23
// Use of this source code is governed by a MIT-style
34
// license that can be found in the LICENSE file.
45

@@ -21,8 +22,9 @@ type CreateUserOption struct {
2122
// swagger:strfmt email
2223
Email string `json:"email" binding:"Required;Email;MaxSize(254)"`
2324
// required: true
24-
Password string `json:"password" binding:"Required;MaxSize(255)"`
25-
SendNotify bool `json:"send_notify"`
25+
Password string `json:"password" binding:"Required;MaxSize(255)"`
26+
MustChangePassword bool `json:"must_change_password"`
27+
SendNotify bool `json:"send_notify"`
2628
}
2729

2830
// AdminCreateUser create a user
@@ -44,6 +46,7 @@ type EditUserOption struct {
4446
// swagger:strfmt email
4547
Email string `json:"email" binding:"Required;Email;MaxSize(254)"`
4648
Password string `json:"password" binding:"MaxSize(255)"`
49+
MustChangePassword bool `json:"must_change_password"`
4750
Website string `json:"website" binding:"MaxSize(50)"`
4851
Location string `json:"location" binding:"MaxSize(50)"`
4952
Active *bool `json:"active"`

0 commit comments

Comments
 (0)