mirror of
https://gitcode.com/gitea/gitea.git
synced 2025-06-03 10:54:42 +08:00
Golint fixed for modules/context
This commit is contained in:
@ -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...)
|
||||
|
Reference in New Issue
Block a user