Merge branch 'allow_appservice_registration' into 'master'
Always allow appservices to register new users See merge request famedly/conduit!105next
commit
fee7d3d2e3
|
@ -88,7 +88,7 @@ pub async fn register_route(
|
||||||
db: State<'_, Arc<Database>>,
|
db: State<'_, Arc<Database>>,
|
||||||
body: Ruma<register::Request<'_>>,
|
body: Ruma<register::Request<'_>>,
|
||||||
) -> ConduitResult<register::Response> {
|
) -> ConduitResult<register::Response> {
|
||||||
if !db.globals.allow_registration() {
|
if !db.globals.allow_registration() && !body.from_appservice {
|
||||||
return Err(Error::BadRequest(
|
return Err(Error::BadRequest(
|
||||||
ErrorKind::Forbidden,
|
ErrorKind::Forbidden,
|
||||||
"Registration has been disabled.",
|
"Registration has been disabled.",
|
||||||
|
|
Loading…
Reference in New Issue