1
0
Fork 0
forked from forgejo/forgejo

Golint fixed for modules/context

This commit is contained in:
Lunny Xiao 2016-11-25 14:51:01 +08:00
parent 6a28909f40
commit faabc76fd6
7 changed files with 20 additions and 3 deletions

View file

@ -12,6 +12,7 @@ import (
macaron "gopkg.in/macaron.v1"
)
// Organization contains organization context
type Organization struct {
IsOwner bool
IsMember bool
@ -23,6 +24,7 @@ type Organization struct {
Team *models.Team
}
// HandleOrgAssignment handles organization assignment
func HandleOrgAssignment(ctx *Context, args ...bool) {
var (
requireMember bool
@ -145,6 +147,7 @@ func HandleOrgAssignment(ctx *Context, args ...bool) {
}
}
// OrgAssignment returns a macaron middleware to handle organization assignment
func OrgAssignment(args ...bool) macaron.Handler {
return func(ctx *Context) {
HandleOrgAssignment(ctx, args...)