forked from forgejo/forgejo
Finish Teams page
This commit is contained in:
parent
99713e1180
commit
e4ea5cf598
11 changed files with 247 additions and 518 deletions
|
@ -36,7 +36,7 @@ func Home(ctx *middleware.Context, params martini.Params) {
|
|||
ctx.Data["Org"] = org
|
||||
|
||||
ctx.Data["Repos"], err = models.GetRepositories(org.Id,
|
||||
ctx.IsSigned && models.IsOrganizationMember(org.Id, ctx.User.Id))
|
||||
ctx.IsSigned && org.IsOrgMember(ctx.User.Id))
|
||||
if err != nil {
|
||||
ctx.Handle(500, "org.Home(GetRepositories)", err)
|
||||
return
|
||||
|
@ -57,11 +57,6 @@ func Home(ctx *middleware.Context, params martini.Params) {
|
|||
ctx.HTML(200, HOME)
|
||||
}
|
||||
|
||||
func Members(ctx *middleware.Context, params martini.Params) {
|
||||
ctx.Data["Title"] = "Organization " + params["org"] + " Members"
|
||||
ctx.HTML(200, "org/members")
|
||||
}
|
||||
|
||||
func New(ctx *middleware.Context) {
|
||||
ctx.Data["Title"] = "Create An Organization"
|
||||
ctx.HTML(200, NEW)
|
||||
|
@ -206,7 +201,7 @@ func DeletePost(ctx *middleware.Context, params martini.Params) {
|
|||
}
|
||||
ctx.Data["Org"] = org
|
||||
|
||||
if !models.IsOrganizationOwner(org.Id, ctx.User.Id) {
|
||||
if !org.IsOrgOwner(ctx.User.Id) {
|
||||
ctx.Error(403)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue