Browse Source

Fix OrgAssignment opts (#36174) (#36177)

Backport #36174 by @wxiaoguang

Fix #36084

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
pull/36179/head
Giteabot 14 hours ago committed by GitHub
parent
commit
a99ccfdf74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      services/context/org.go

3
services/context/org.go

@ -70,8 +70,9 @@ type OrgAssignmentOptions struct { @@ -70,8 +70,9 @@ type OrgAssignmentOptions struct {
}
// OrgAssignment returns a middleware to handle organization assignment
func OrgAssignment(opts OrgAssignmentOptions) func(ctx *Context) {
func OrgAssignment(orgAssignmentOpts OrgAssignmentOptions) func(ctx *Context) {
return func(ctx *Context) {
opts := orgAssignmentOpts // it must be a copy, because the values will be changed
var err error
if ctx.ContextUser == nil {
// if Organization is not defined, get it from params

Loading…
Cancel
Save