Skip to content

Commit 2f29c25

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.
1 parent 5833ca6 commit 2f29c25

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)