Skip to content

Commit b2de9dd

Browse files
authored
Merge branch 'master' into lunny/fix_webhook
2 parents 726b7e8 + d2ee122 commit b2de9dd

File tree

19 files changed

+104
-50
lines changed

19 files changed

+104
-50
lines changed

.drone.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,18 @@ steps:
3333
GOSUMDB: sum.golang.org
3434
TAGS: bindata sqlite sqlite_unlock_notify
3535

36+
- name: lint-backend-windows
37+
pull: always
38+
image: golang:1.15
39+
commands:
40+
- make golangci-lint vet
41+
environment:
42+
GOPROXY: https://goproxy.cn # proxy.golang.org is blocked in China, this proxy is not
43+
GOSUMDB: sum.golang.org
44+
TAGS: bindata sqlite sqlite_unlock_notify
45+
GOOS: windows
46+
GOARCH: amd64
47+
3648
- name: lint-backend-gogit
3749
pull: always
3850
image: golang:1.15
@@ -85,6 +97,18 @@ steps:
8597
- rm ./gitea # clean
8698
depends_on: [checks-backend]
8799

100+
- name: build-backend-windows
101+
image: golang:1.15
102+
environment:
103+
GO111MODULE: on
104+
GOPROXY: off
105+
GOOS: windows
106+
GOARCH: amd64
107+
TAGS: bindata gogit
108+
commands:
109+
- go build -mod=vendor -o gitea_windows
110+
depends_on: [checks-backend]
111+
88112
- name: build-backend-386
89113
image: golang:1.15
90114
environment:

docs/content/page/index.en-us.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ Windows, on architectures like amd64, i386, ARM, PowerPC, and others.
268268
## Components
269269

270270
* Web framework: [Macaron](http://go-macaron.com/)
271-
* ORM: [XORM](https://github.com/go-xorm/xorm)
271+
* ORM: [XORM](https://xorm.io)
272272
* UI components:
273273
* [Semantic UI](http://semantic-ui.com/)
274274
* [GitHub Octicons](https://octicons.github.com/)

docs/content/page/index.fr-fr.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ Le but de ce projet est de fournir de la manière la plus simple, la plus rapide
255255
## Composants
256256

257257
* Framework web : [Macaron](http://go-macaron.com/)
258-
* ORM : [XORM](https://github.com/go-xorm/xorm)
258+
* ORM: [XORM](https://xorm.io)
259259
* Interface graphique :
260260
* [Semantic UI](http://semantic-ui.com/)
261261
* [GitHub Octicons](https://octicons.github.com/)

docs/content/page/index.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Gitea的首要目标是创建一个极易安装,运行非常快速,安装和
4848
## 组件
4949

5050
* Web框架: [Macaron](http://go-macaron.com/)
51-
* ORM [XORM](https://github.com/go-xorm/xorm)
51+
* ORM: [XORM](https://xorm.io)
5252
* UI组件:
5353
* [Semantic UI](http://semantic-ui.com/)
5454
* [GitHub Octicons](https://octicons.github.com/)

docs/content/page/index.zh-tw.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ Gitea 的首要目標是建立一個容易安裝,運行快速,安装和使
4848
## 元件
4949

5050
* Web 框架: [Macaron](http://go-macaron.com/)
51-
* ORM: [XORM](https://github.com/go-xorm/xorm)
51+
* ORM: [XORM](https://xorm.io)
5252
* UI 元件:
5353
* [Semantic UI](http://semantic-ui.com/)
5454
* [GitHub Octicons](https://octicons.github.com/)

modules/auth/sso/basic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (b *Basic) IsEnabled() bool {
4747
// "Authorization" header of the request and returns the corresponding user object for that
4848
// name/token on successful validation.
4949
// Returns nil if header is empty or validation fails.
50-
func (b *Basic) VerifyAuthData(req *http.Request, store DataStore, sess SessionStore) *models.User {
50+
func (b *Basic) VerifyAuthData(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User {
5151
baHead := req.Header.Get("Authorization")
5252
if len(baHead) == 0 {
5353
return nil

modules/auth/sso/interface.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,5 +40,5 @@ type SingleSignOn interface {
4040
// or a new user object (with id = 0) populated with the information that was found
4141
// in the authentication data (username or email).
4242
// Returns nil if verification fails.
43-
VerifyAuthData(http *http.Request, store DataStore, sess SessionStore) *models.User
43+
VerifyAuthData(http *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User
4444
}

modules/auth/sso/oauth2.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func (o *OAuth2) IsEnabled() bool {
114114
// or the "Authorization" header and returns the corresponding user object for that ID.
115115
// If verification is successful returns an existing user object.
116116
// Returns nil if verification fails.
117-
func (o *OAuth2) VerifyAuthData(req *http.Request, store DataStore, sess SessionStore) *models.User {
117+
func (o *OAuth2) VerifyAuthData(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User {
118118
if !models.HasEngine {
119119
return nil
120120
}

modules/auth/sso/reverseproxy.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ func (r *ReverseProxy) IsEnabled() bool {
6060
// If a username is available in the "setting.ReverseProxyAuthUser" header an existing
6161
// user object is returned (populated with username or email found in header).
6262
// Returns nil if header is empty.
63-
func (r *ReverseProxy) VerifyAuthData(req *http.Request, store DataStore, sess SessionStore) *models.User {
63+
func (r *ReverseProxy) VerifyAuthData(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User {
6464
username := r.getUserName(req)
6565
if len(username) == 0 {
6666
return nil

modules/auth/sso/session.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (s *Session) IsEnabled() bool {
3939
// VerifyAuthData checks if there is a user uid stored in the session and returns the user
4040
// object for that uid.
4141
// Returns nil if there is no user uid stored in the session.
42-
func (s *Session) VerifyAuthData(req *http.Request, store DataStore, sess SessionStore) *models.User {
42+
func (s *Session) VerifyAuthData(req *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User {
4343
user := SessionUser(sess)
4444
if user != nil {
4545
return user

0 commit comments

Comments
 (0)