mirror of
https://github.com/go-gitea/gitea
synced 2024-11-15 22:54:24 +00:00
Merge branch 'develop' of github.com:gogits/gogs into develop
This commit is contained in:
commit
af847ef94e
@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra
|
|||||||
|
|
||||||
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
|
![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true)
|
||||||
|
|
||||||
##### Current version: 0.9.2
|
##### Current version: 0.9.3
|
||||||
|
|
||||||
| Web | UI | Preview |
|
| Web | UI | Preview |
|
||||||
|:-------------:|:-------:|:-------:|
|
|:-------------:|:-------:|:-------:|
|
||||||
|
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.2.0309"
|
const APP_VER = "0.9.3.0309"
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
runtime.GOMAXPROCS(runtime.NumCPU())
|
runtime.GOMAXPROCS(runtime.NumCPU())
|
||||||
|
@ -1071,11 +1071,10 @@ WHERE team_user.org_id = ? AND team_user.uid = ?`, org.Id, userID).Find(&teams);
|
|||||||
}
|
}
|
||||||
|
|
||||||
repos := make([]*Repository, 0, 5)
|
repos := make([]*Repository, 0, 5)
|
||||||
if err = x.Sql(`SELECT repository.* FROM repository
|
if err = x.Sql(fmt.Sprintf(`SELECT repository.* FROM repository
|
||||||
INNER JOIN team_repo ON team_repo.repo_id = repository.id
|
INNER JOIN team_repo ON team_repo.repo_id = repository.id
|
||||||
WHERE (repository.owner_id = ? AND repository.is_private = ?) OR team_repo.team_id IN (?)
|
WHERE (repository.owner_id = ? AND repository.is_private = ?) OR team_repo.team_id IN (%s)
|
||||||
GROUP BY repository.id`,
|
GROUP BY repository.id`, strings.Join(teamIDs, ",")), org.Id, false).Find(&repos); err != nil {
|
||||||
org.Id, false, strings.Join(teamIDs, ",")).Find(&repos); err != nil {
|
|
||||||
return fmt.Errorf("get repositories: %v", err)
|
return fmt.Errorf("get repositories: %v", err)
|
||||||
}
|
}
|
||||||
org.Repos = repos
|
org.Repos = repos
|
||||||
|
@ -90,7 +90,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
|
|||||||
if ctx.Org.IsMember {
|
if ctx.Org.IsMember {
|
||||||
if ctx.Org.IsOwner {
|
if ctx.Org.IsOwner {
|
||||||
if err := org.GetTeams(); err != nil {
|
if err := org.GetTeams(); err != nil {
|
||||||
ctx.Handle(500, "GetUserTeams", err)
|
ctx.Handle(500, "GetTeams", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -332,11 +332,20 @@ func showOrgProfile(ctx *middleware.Context) {
|
|||||||
ctx.Data["Title"] = org.FullName
|
ctx.Data["Title"] = org.FullName
|
||||||
|
|
||||||
if ctx.IsSigned {
|
if ctx.IsSigned {
|
||||||
|
if ctx.User.IsAdmin {
|
||||||
|
repos, err := models.GetRepositories(org.Id, true)
|
||||||
|
if err != nil {
|
||||||
|
ctx.Handle(500, "GetRepositoriesAsAdmin", err)
|
||||||
|
return
|
||||||
|
}
|
||||||
|
ctx.Data["Repos"] = repos
|
||||||
|
} else {
|
||||||
if err := org.GetUserRepositories(ctx.User.Id); err != nil {
|
if err := org.GetUserRepositories(ctx.User.Id); err != nil {
|
||||||
ctx.Handle(500, "GetUserRepositories", err)
|
ctx.Handle(500, "GetUserRepositories", err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
ctx.Data["Repos"] = org.Repos
|
ctx.Data["Repos"] = org.Repos
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
repos, err := models.GetRepositories(org.Id, false)
|
repos, err := models.GetRepositories(org.Id, false)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -1 +1 @@
|
|||||||
0.9.2.0309
|
0.9.3.0309
|
Loading…
Reference in New Issue
Block a user