Skip to content

Commit f067046

Browse files
authored
Merge branch 'master' into add_api_for_comment-reactions
2 parents ffb31cd + 8d8aecd commit f067046

File tree

4 files changed

+25
-24
lines changed

4 files changed

+25
-24
lines changed

README.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
[简体中文](https://github.com/go-gitea/gitea/blob/master/README_ZH.md)
1+
[简体中文](README_ZH.md)
22

33
<h1> <img src="https://raw.githubusercontent.com/go-gitea/gitea/master/public/img/gitea-192.png" alt="logo" width="30" height="30"> Gitea - Git with a cup of tea</h1>
44

@@ -105,9 +105,8 @@ for the full license text.
105105
## Screenshots
106106
Looking for an overview of the interface? Check it out!
107107

108-
| | | |
108+
|![Dashboard](https://dl.gitea.io/screenshots/home_timeline.png)|![User Profile](https://dl.gitea.io/screenshots/user_profile.png)|![Global Issues](https://dl.gitea.io/screenshots/global_issues.png)|
109109
|:---:|:---:|:---:|
110-
|![Dashboard](https://image.ibb.co/dms6DG/1.png)|![Repository](https://image.ibb.co/m6MSLw/2.png)|![Commits History](https://image.ibb.co/cjrSLw/3.png)|
111-
|![Branches](https://image.ibb.co/e6vbDG/4.png)|![Issues](https://image.ibb.co/bJTJSb/5.png)|![Pull Request View](https://image.ibb.co/e02dSb/6.png)|
112-
|![Releases](https://image.ibb.co/cUzgfw/7.png)|![Activity](https://image.ibb.co/eZgGDG/8.png)|![Uncyclo](https://image.ibb.co/dYV9YG/9.png)|
113-
|![Diff](https://image.ibb.co/ewA9YG/10.png)|![Organization](https://image.ibb.co/ceOwDG/11.png)|![Profile](https://image.ibb.co/c44Q7b/12.png)|
110+
|![Branches](https://dl.gitea.io/screenshots/branches.png)|![Web Editor](https://dl.gitea.io/screenshots/web_editor.png)|![Activity](https://dl.gitea.io/screenshots/activity.png)|
111+
|![New Migration](https://dl.gitea.io/screenshots/migration.png)|![Migrating](https://dl.gitea.io/screenshots/migration.gif)|![Pull Request View](https://image.ibb.co/e02dSb/6.png)
112+
![Pull Request Dark](https://dl.gitea.io/screenshots/pull_requests_dark.png)|![Diff Review Dark](https://dl.gitea.io/screenshots/review_dark.png)|![Diff Dark](https://dl.gitea.io/screenshots/diff_dark.png)|

README_ZH.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
1-
[English](https://github.com/go-gitea/gitea/blob/master/README.md)
1+
[English](README.md)
22

3-
# Gitea - Git with a cup of tea
3+
<h1> <img src="https://raw.githubusercontent.com/go-gitea/gitea/master/public/img/gitea-192.png" alt="logo" width="30" height="30"> Gitea - Git with a cup of tea</h1>
44

55
[![Build Status](https://drone.gitea.io/api/badges/go-gitea/gitea/status.svg)](https://drone.gitea.io/go-gitea/gitea)
6-
[![Join the chat at https://img.shields.io/discord/322538954119184384.svg](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/gitea)
6+
[![Join the Discord chat at https://discord.gg/NsatcWJ](https://img.shields.io/discord/322538954119184384.svg)](https://discord.gg/NsatcWJ)
77
[![](https://images.microbadger.com/badges/image/gitea/gitea.svg)](https://microbadger.com/images/gitea/gitea "Get your own image badge on microbadger.com")
88
[![codecov](https://codecov.io/gh/go-gitea/gitea/branch/master/graph/badge.svg)](https://codecov.io/gh/go-gitea/gitea)
99
[![Go Report Card](https://goreportcard.com/badge/code.gitea.io/gitea)](https://goreportcard.com/report/code.gitea.io/gitea)
1010
[![GoDoc](https://godoc.org/code.gitea.io/gitea?status.svg)](https://godoc.org/code.gitea.io/gitea)
1111
[![GitHub release](https://img.shields.io/github/release/go-gitea/gitea.svg)](https://github.com/go-gitea/gitea/releases/latest)
12+
[![Help Contribute to Open Source](https://www.codetriage.com/go-gitea/gitea/badges/users.svg)](https://www.codetriage.com/go-gitea/gitea)
1213
[![Become a backer/sponsor of gitea](https://opencollective.com/gitea/tiers/backers/badge.svg?label=backers&color=brightgreen)](https://opencollective.com/gitea)
1314
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
1415
[![Crowdin](https://badges.crowdin.net/gitea/localized.svg)](https://crowdin.com/project/gitea)
@@ -45,9 +46,8 @@ Fork -> Patch -> Push -> Pull Request
4546

4647
## 截图
4748

48-
| | | |
49+
|![Dashboard](https://dl.gitea.io/screenshots/home_timeline.png)|![User Profile](https://dl.gitea.io/screenshots/user_profile.png)|![Global Issues](https://dl.gitea.io/screenshots/global_issues.png)|
4950
|:---:|:---:|:---:|
50-
|![Dashboard](https://image.ibb.co/dms6DG/1.png)|![Repository](https://image.ibb.co/m6MSLw/2.png)|![Commits History](https://image.ibb.co/cjrSLw/3.png)|
51-
|![Branches](https://image.ibb.co/e6vbDG/4.png)|![Issues](https://image.ibb.co/bJTJSb/5.png)|![Pull Request View](https://image.ibb.co/e02dSb/6.png)|
52-
|![Releases](https://image.ibb.co/cUzgfw/7.png)|![Activity](https://image.ibb.co/eZgGDG/8.png)|![Uncyclo](https://image.ibb.co/dYV9YG/9.png)|
53-
|![Diff](https://image.ibb.co/ewA9YG/10.png)|![Organization](https://image.ibb.co/ceOwDG/11.png)|![Profile](https://image.ibb.co/c44Q7b/12.png)|
51+
|![Branches](https://dl.gitea.io/screenshots/branches.png)|![Web Editor](https://dl.gitea.io/screenshots/web_editor.png)|![Activity](https://dl.gitea.io/screenshots/activity.png)|
52+
|![New Migration](https://dl.gitea.io/screenshots/migration.png)|![Migrating](https://dl.gitea.io/screenshots/migration.gif)|![Pull Request View](https://image.ibb.co/e02dSb/6.png)
53+
![Pull Request Dark](https://dl.gitea.io/screenshots/pull_requests_dark.png)|![Diff Review Dark](https://dl.gitea.io/screenshots/review_dark.png)|![Diff Dark](https://dl.gitea.io/screenshots/diff_dark.png)|

routers/admin/users.go

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,11 @@ func NewUserPost(ctx *context.Context, form auth.AdminCreateUserForm) {
7979
}
8080

8181
u := &models.User{
82-
Name: form.UserName,
83-
Email: form.Email,
84-
Passwd: form.Password,
85-
IsActive: true,
86-
LoginType: models.LoginPlain,
87-
MustChangePassword: form.MustChangePassword,
82+
Name: form.UserName,
83+
Email: form.Email,
84+
Passwd: form.Password,
85+
IsActive: true,
86+
LoginType: models.LoginPlain,
8887
}
8988

9089
if len(form.LoginType) > 0 {
@@ -95,9 +94,12 @@ func NewUserPost(ctx *context.Context, form auth.AdminCreateUserForm) {
9594
u.LoginName = form.LoginName
9695
}
9796
}
98-
if !password.IsComplexEnough(form.Password) {
99-
ctx.RenderWithErr(ctx.Tr("form.password_complexity"), tplUserNew, &form)
100-
return
97+
if u.LoginType == models.LoginPlain {
98+
if !password.IsComplexEnough(form.Password) {
99+
ctx.RenderWithErr(ctx.Tr("form.password_complexity"), tplUserNew, &form)
100+
return
101+
}
102+
u.MustChangePassword = form.MustChangePassword
101103
}
102104
if err := models.CreateUser(u); err != nil {
103105
switch {

templates/admin/user/new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
<input id="password" name="password" type="password" value="{{.password}}" {{if eq .login_type "0-0"}}required{{end}}>
4343
</div>
4444

45-
<div class="inline field">
45+
<div class="inline field local{{if ne .login_type "0-0"}} hide{{end}}">
4646
<div class="ui checkbox">
4747
<label><strong>{{.i18n.Tr "auth.allow_password_change" }}</strong></label>
4848
<input name="must_change_password" type="checkbox" checked>

0 commit comments

Comments
 (0)