fix: Fix M_NOT_FOUND for users with no origin set
This commit is contained in:
parent
957cd3502f
commit
ae2b87f03f
1 changed files with 8 additions and 1 deletions
|
|
@ -58,7 +58,14 @@ impl Service {
|
||||||
return Err!("Cannot issue a password reset token for the server user");
|
return Err!("Cannot issue a password reset token for the server user");
|
||||||
}
|
}
|
||||||
|
|
||||||
if self.services.users.origin(&user_id).await? != "password" {
|
if self
|
||||||
|
.services
|
||||||
|
.users
|
||||||
|
.origin(&user_id)
|
||||||
|
.await
|
||||||
|
.unwrap_or_else(|_| "password".to_owned())
|
||||||
|
!= "password"
|
||||||
|
{
|
||||||
return Err!("Cannot issue a password reset token for non-internal user {user_id}");
|
return Err!("Cannot issue a password reset token for non-internal user {user_id}");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue