mirror of https://github.com/gogs/gogs.git
Fix #3905
parent
d3b2ff17d6
commit
34b92cdb44
|
@ -14,9 +14,9 @@ github.com/go-macaron/inject = commit:c5ab7bf
|
||||||
github.com/go-macaron/session = commit:66031fc
|
github.com/go-macaron/session = commit:66031fc
|
||||||
github.com/go-macaron/toolbox = commit:82b5115
|
github.com/go-macaron/toolbox = commit:82b5115
|
||||||
github.com/go-sql-driver/mysql = commit:0b58b37
|
github.com/go-sql-driver/mysql = commit:0b58b37
|
||||||
github.com/go-xorm/builder = commit:cd42e83
|
github.com/go-xorm/builder = commit:db75972
|
||||||
github.com/go-xorm/core = commit:2ec3936
|
github.com/go-xorm/core = commit:87aca22
|
||||||
github.com/go-xorm/xorm = commit:311abf2
|
github.com/go-xorm/xorm = commit:3ad0b42
|
||||||
github.com/gogits/chardet = commit:2404f77
|
github.com/gogits/chardet = commit:2404f77
|
||||||
github.com/gogits/cron = commit:7f3990a
|
github.com/gogits/cron = commit:7f3990a
|
||||||
github.com/gogits/git-module = commit:7129215
|
github.com/gogits/git-module = commit:7129215
|
||||||
|
|
|
@ -3,7 +3,7 @@ Gogs - Go Git Service [
|

|
||||||
|
|
||||||
##### Current tip version: 0.9.101 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions or submit a task on [alpha stage automated binary building system](https://build.gogs.io/))
|
##### Current tip version: 0.9.102 (see [Releases](https://github.com/gogits/gogs/releases) for binary versions or submit a task on [alpha stage automated binary building system](https://build.gogs.io/))
|
||||||
|
|
||||||
| Web | UI | Preview |
|
| Web | UI | Preview |
|
||||||
|:-------------:|:-------:|:-------:|
|
|:-------------:|:-------:|:-------:|
|
||||||
|
|
|
@ -33,11 +33,11 @@ imports:
|
||||||
- name: github.com/go-sql-driver/mysql
|
- name: github.com/go-sql-driver/mysql
|
||||||
version: 0b58b37b664c21f3010e836f1b931e1d0b0b0685
|
version: 0b58b37b664c21f3010e836f1b931e1d0b0b0685
|
||||||
- name: github.com/go-xorm/builder
|
- name: github.com/go-xorm/builder
|
||||||
version: cd42e8337f3031e737c3f415b6354793cf30f1c9
|
version: db75972580de4a7c6c20fff5b16a924c3de3fa12
|
||||||
- name: github.com/go-xorm/core
|
- name: github.com/go-xorm/core
|
||||||
version: 2ec3936f8a8a3fb6397c6c10185acffa87488534
|
version: 87aca223378aab7a4bf31ef53f20fde4997ad793
|
||||||
- name: github.com/go-xorm/xorm
|
- name: github.com/go-xorm/xorm
|
||||||
version: 311abf25abd146a5ddaad5dc3241eba4b4b29284
|
version: 3ad0b428ae702d7d3f880c90a7f6d89805fcd2f7
|
||||||
- name: github.com/gogits/chardet
|
- name: github.com/gogits/chardet
|
||||||
version: 2404f777256163ea3eadb273dada5dcb037993c0
|
version: 2404f777256163ea3eadb273dada5dcb037993c0
|
||||||
- name: github.com/gogits/cron
|
- name: github.com/gogits/cron
|
||||||
|
|
2
gogs.go
2
gogs.go
|
@ -17,7 +17,7 @@ import (
|
||||||
"github.com/gogits/gogs/modules/setting"
|
"github.com/gogits/gogs/modules/setting"
|
||||||
)
|
)
|
||||||
|
|
||||||
const APP_VER = "0.9.101.1220"
|
const APP_VER = "0.9.102.1220"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
|
|
@ -34,6 +34,7 @@ type Engine interface {
|
||||||
InsertOne(interface{}) (int64, error)
|
InsertOne(interface{}) (int64, error)
|
||||||
Iterate(interface{}, xorm.IterFunc) error
|
Iterate(interface{}, xorm.IterFunc) error
|
||||||
Sql(string, ...interface{}) *xorm.Session
|
Sql(string, ...interface{}) *xorm.Session
|
||||||
|
Table(interface{}) *xorm.Session
|
||||||
Where(interface{}, ...interface{}) *xorm.Session
|
Where(interface{}, ...interface{}) *xorm.Session
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -149,7 +149,7 @@ func CreateOrganization(org, owner *User) (err error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if _, err = sess.Insert(&TeamUser{
|
if _, err = sess.Insert(&TeamUser{
|
||||||
Uid: owner.ID,
|
UID: owner.ID,
|
||||||
OrgID: org.ID,
|
OrgID: org.ID,
|
||||||
TeamID: t.ID,
|
TeamID: t.ID,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
|
|
|
@ -369,7 +369,7 @@ type TeamUser struct {
|
||||||
ID int64 `xorm:"pk autoincr"`
|
ID int64 `xorm:"pk autoincr"`
|
||||||
OrgID int64 `xorm:"INDEX"`
|
OrgID int64 `xorm:"INDEX"`
|
||||||
TeamID int64 `xorm:"UNIQUE(s)"`
|
TeamID int64 `xorm:"UNIQUE(s)"`
|
||||||
Uid int64 `xorm:"UNIQUE(s)"`
|
UID int64 `xorm:"UNIQUE(s)"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func isTeamMember(e Engine, orgID, teamID, uid int64) bool {
|
func isTeamMember(e Engine, orgID, teamID, uid int64) bool {
|
||||||
|
@ -390,8 +390,8 @@ func getTeamMembers(e Engine, teamID int64) (_ []*User, err error) {
|
||||||
members := make([]*User, 0, len(teamUsers))
|
members := make([]*User, 0, len(teamUsers))
|
||||||
for i := range teamUsers {
|
for i := range teamUsers {
|
||||||
member := new(User)
|
member := new(User)
|
||||||
if _, err = e.Id(teamUsers[i].Uid).Get(member); err != nil {
|
if _, err = e.Id(teamUsers[i].UID).Get(member); err != nil {
|
||||||
return nil, fmt.Errorf("get user '%d': %v", teamUsers[i].Uid, err)
|
return nil, fmt.Errorf("get user '%d': %v", teamUsers[i].UID, err)
|
||||||
}
|
}
|
||||||
members = append(members, member)
|
members = append(members, member)
|
||||||
}
|
}
|
||||||
|
@ -457,7 +457,7 @@ func AddTeamMember(orgID, teamID, uid int64) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
tu := &TeamUser{
|
tu := &TeamUser{
|
||||||
Uid: uid,
|
UID: uid,
|
||||||
OrgID: orgID,
|
OrgID: orgID,
|
||||||
TeamID: teamID,
|
TeamID: teamID,
|
||||||
}
|
}
|
||||||
|
@ -519,7 +519,7 @@ func removeTeamMember(e Engine, orgID, teamID, uid int64) error {
|
||||||
}
|
}
|
||||||
|
|
||||||
tu := &TeamUser{
|
tu := &TeamUser{
|
||||||
Uid: uid,
|
UID: uid,
|
||||||
OrgID: orgID,
|
OrgID: orgID,
|
||||||
TeamID: teamID,
|
TeamID: teamID,
|
||||||
}
|
}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
0.9.101.1220
|
0.9.102.1220
|
Loading…
Reference in New Issue