Skip to content

Commit

Permalink
Allow admin to create org repo
Browse files Browse the repository at this point in the history
Signed-off-by: loheagn <[email protected]>
  • Loading branch information
loheagn committed Jan 3, 2023
1 parent f1a553a commit 858db1b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/route/api/v1/repo/repo.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ func CreateOrgRepo(c *context.APIContext, opt api.CreateRepoOption) {
return
}

if !org.IsOwnedBy(c.User.ID) {
if !c.User.IsAdmin && !org.IsOwnedBy(c.User.ID) {
c.ErrorStatus(http.StatusForbidden, errors.New("Given user is not owner of organization."))
return
}
Expand Down

0 comments on commit 858db1b

Please sign in to comment.