fix: add OrgAssignment middleware to populate org context

The reqOrgOwnership middleware requires ctx.Org to be populated.
Added context.OrgAssignment() to the route group to ensure this.

Signed-off-by: SBALAVIGNESH123 <balavignesh449@gmail.com>
pull/36113/head
SBALAVIGNESH123 2025-12-10 05:58:21 +07:00
parent 442f74cf47
commit a498e10075
1 changed files with 1 additions and 1 deletions

@ -1633,7 +1633,7 @@ func Routes() *web.Router {
m.Post("", reqOrgOwnership(), org.AddCrossRepoAccess)
m.Delete("/{id}", reqOrgOwnership(), org.DeleteCrossRepoAccess)
})
}, reqToken())
}, reqToken(), context.OrgAssignment(context.OrgAssignmentOptions{}))
m.Combo("").Get(org.Get).
Patch(reqToken(), reqOrgOwnership(), bind(api.EditOrgOption{}), org.Edit).