In debug mode allow resolving objects without auth (#5013)

This commit is contained in:
Nutomic 2024-09-11 14:53:24 +02:00 committed by GitHub
parent ef5e2d96cd
commit fc13009611
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -27,7 +27,7 @@ pub async fn resolve_object(
// if there's no personId then the JWT was missing or invalid. // if there's no personId then the JWT was missing or invalid.
let is_authenticated = local_user_view.is_some(); let is_authenticated = local_user_view.is_some();
let res = if is_authenticated { let res = if is_authenticated || cfg!(debug_assertions) {
// user is fully authenticated; allow remote lookups as well. // user is fully authenticated; allow remote lookups as well.
search_query_to_object_id(data.q.clone(), &context).await search_query_to_object_id(data.q.clone(), &context).await
} else { } else {