0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-01-05 21:47:04 +01:00

Fix OrgAssignment opts (#36174) (#36177)

Backport #36174 by @wxiaoguang

Fix #36084

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
This commit is contained in:
Giteabot 2025-12-17 18:56:58 +08:00 committed by GitHub
parent d448ab9ad4
commit a99ccfdf74
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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