mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-10-01 01:36:12 -04:00
In debug mode allow resolving objects without auth (#5013)
This commit is contained in:
parent
ef5e2d96cd
commit
fc13009611
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user