diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2016-11-25 14:51:01 +0800 |
---|---|---|
committer | Lunny Xiao <xiaolunwen@gmail.com> | 2016-11-25 14:53:59 +0800 |
commit | faabc76fd68b0ecccba1dc8dae47220b28cce05a (patch) | |
tree | d0a7f9b6417bc0bf596b3e0ed4f53e055d90a930 /modules/context/org.go | |
parent | 6a28909f40ad1ff20d325d9be4ada87e5b75ce53 (diff) | |
download | gitea-faabc76fd68b0ecccba1dc8dae47220b28cce05a.tar.gz gitea-faabc76fd68b0ecccba1dc8dae47220b28cce05a.zip |
Golint fixed for modules/context
Diffstat (limited to 'modules/context/org.go')
-rw-r--r-- | modules/context/org.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/context/org.go b/modules/context/org.go index 50919ef97e..d31d9773a0 100644 --- a/modules/context/org.go +++ b/modules/context/org.go @@ -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...) |