Skip to content

Commit a498e10

Browse files
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 <[email protected]>
1 parent 442f74c commit a498e10

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

routers/api/v1/api.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1633,7 +1633,7 @@ func Routes() *web.Router {
16331633
m.Post("", reqOrgOwnership(), org.AddCrossRepoAccess)
16341634
m.Delete("/{id}", reqOrgOwnership(), org.DeleteCrossRepoAccess)
16351635
})
1636-
}, reqToken())
1636+
}, reqToken(), context.OrgAssignment(context.OrgAssignmentOptions{}))
16371637

16381638
m.Combo("").Get(org.Get).
16391639
Patch(reqToken(), reqOrgOwnership(), bind(api.EditOrgOption{}), org.Edit).

0 commit comments

Comments
 (0)