Merge branch 'error-create-remote-user' into 'next'
fix(admin): don't allow creation of remote users See merge request famedly/conduit!663
This commit is contained in:
commit
38200163d6
2 changed files with 8 additions and 1 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -432,7 +432,6 @@ dependencies = [
|
|||
"tracing-flame",
|
||||
"tracing-opentelemetry",
|
||||
"tracing-subscriber",
|
||||
"trust-dns-resolver",
|
||||
"url",
|
||||
]
|
||||
|
||||
|
|
|
@ -605,6 +605,14 @@ impl Service {
|
|||
)))
|
||||
}
|
||||
};
|
||||
|
||||
// Checks if user is local
|
||||
if user_id.server_name() != services().globals.server_name() {
|
||||
return Ok(RoomMessageEventContent::text_plain(
|
||||
"The specified user is not from this server!",
|
||||
));
|
||||
};
|
||||
|
||||
if user_id.is_historical() {
|
||||
return Ok(RoomMessageEventContent::text_plain(format!(
|
||||
"Userid {user_id} is not allowed due to historical"
|
||||
|
|
Loading…
Reference in a new issue