Skip to content

Commit

Permalink
Doc why we skip ensureStorageNamespace for read-only repositories (#8396
Browse files Browse the repository at this point in the history
)
  • Loading branch information
idanovo authored Nov 26, 2024
1 parent 64bf5bd commit 9d7bc3e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/api/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -1987,7 +1987,8 @@ func (c *Controller) CreateRepository(w http.ResponseWriter, r *http.Request, bo
writeResponse(w, r, http.StatusCreated, response)
return
}

// Since this is a read-only repository, there is no harm in case the storage namespace we use is already used by
// another repository or if we don't have write permissions for this namespace.
if !swag.BoolValue(body.ReadOnly) {
if err := c.ensureStorageNamespace(ctx, body.StorageNamespace); err != nil {
var (
Expand Down

0 comments on commit 9d7bc3e

Please sign in to comment.