Skip to content
Snippets Groups Projects
Commit cdcf4a01 authored by Timo Kösters's avatar Timo Kösters
Browse files

Merge branch 'fixreset' into 'next'

fix: allow reactivation of users using reset-password admin command

See merge request famedly/conduit!458
parents 4223288c fc0aff20
No related branches found
No related tags found
No related merge requests found
...@@ -556,7 +556,6 @@ async fn process_admin_command( ...@@ -556,7 +556,6 @@ async fn process_admin_command(
// Check if the specified user is valid // Check if the specified user is valid
if !services().users.exists(&user_id)? if !services().users.exists(&user_id)?
|| services().users.is_deactivated(&user_id)?
|| user_id || user_id
== UserId::parse_with_server_name( == UserId::parse_with_server_name(
"conduit", "conduit",
...@@ -565,7 +564,7 @@ async fn process_admin_command( ...@@ -565,7 +564,7 @@ async fn process_admin_command(
.expect("conduit user exists") .expect("conduit user exists")
{ {
return Ok(RoomMessageEventContent::text_plain( return Ok(RoomMessageEventContent::text_plain(
"The specified user does not exist or is deactivated!", "The specified user does not exist!",
)); ));
} }
...@@ -600,12 +599,12 @@ async fn process_admin_command( ...@@ -600,12 +599,12 @@ async fn process_admin_command(
}; };
if user_id.is_historical() { if user_id.is_historical() {
return Ok(RoomMessageEventContent::text_plain(format!( return Ok(RoomMessageEventContent::text_plain(format!(
"userid {user_id} is not allowed due to historical" "Userid {user_id} is not allowed due to historical"
))); )));
} }
if services().users.exists(&user_id)? { if services().users.exists(&user_id)? {
return Ok(RoomMessageEventContent::text_plain(format!( return Ok(RoomMessageEventContent::text_plain(format!(
"userid {user_id} already exists" "Userid {user_id} already exists"
))); )));
} }
// Create user // Create user
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment