don't allow accessing non-existing repositories
This commit is contained in:
parent
381ce040fd
commit
f6fca3818a
1 changed files with 1 additions and 1 deletions
|
@ -360,7 +360,7 @@ fn check_access(
|
||||||
.expect("could not run query");
|
.expect("could not run query");
|
||||||
|
|
||||||
match res {
|
match res {
|
||||||
None => Ok(()), // name has not been claimed yet (TODO: verify its validity)
|
None => Err(StatusCode::FORBIDDEN),
|
||||||
Some(existing_bot) => {
|
Some(existing_bot) => {
|
||||||
let RegistryAuth::User(user) = auth;
|
let RegistryAuth::User(user) = auth;
|
||||||
if existing_bot.owner_id == Some(user.id) {
|
if existing_bot.owner_id == Some(user.id) {
|
||||||
|
|
Loading…
Reference in a new issue