Skip to content

Commit eaa47c3

Browse files
authored
Fix OrgAssignment opts (#36174)
Fix #36084
1 parent 0e916c6 commit eaa47c3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

services/context/org.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,9 @@ type OrgAssignmentOptions struct {
7070
}
7171

7272
// OrgAssignment returns a middleware to handle organization assignment
73-
func OrgAssignment(opts OrgAssignmentOptions) func(ctx *Context) {
73+
func OrgAssignment(orgAssignmentOpts OrgAssignmentOptions) func(ctx *Context) {
7474
return func(ctx *Context) {
75+
opts := orgAssignmentOpts // it must be a copy, because the values will be changed
7576
var err error
7677
if ctx.ContextUser == nil {
7778
// if Organization is not defined, get it from params

0 commit comments

Comments
 (0)