don't allow accessing non-existing repositories

This commit is contained in:
Ilion Beyst 2022-06-24 19:32:22 +02:00
parent 381ce040fd
commit f6fca3818a

View file

@ -360,7 +360,7 @@ fn check_access(
.expect("could not run query");
match res {
None => Ok(()), // name has not been claimed yet (TODO: verify its validity)
None => Err(StatusCode::FORBIDDEN),
Some(existing_bot) => {
let RegistryAuth::User(user) = auth;
if existing_bot.owner_id == Some(user.id) {