mirror of
https://forgejo.ellis.link/continuwuation/continuwuity.git
synced 2026-11-25 18:07:32 +00:00
fix: Actually config-gate MSC4484 support
This commit is contained in:
1 parent
f3cbfed721
commit
cebeee6bae
5 files changed
+27
-12
No files matched your search
@@ -5,7 +5,9 @@ use std::{
|
||||
};
|
||||
|
||||
use conduwuit::{
|
||||
Err, Error, Result, err,
|
||||
Err, Error, Result,
|
||||
config::experiments::ToggledExperiment,
|
||||
err,
|
||||
utils::{IterStream, millis_since_unix_epoch},
|
||||
};
|
||||
use http::StatusCode;
|
||||
@@ -343,7 +345,9 @@ async fn check_access_token(
|
||||
} else {
|
||||
let mut scopes = BTreeSet::from_iter([OAuthClientScope::ApiFullAccess]);
|
||||
|
||||
if services.admin.user_is_admin(&sender_user).await {
|
||||
if services.config.experiments.msc4484.is_enabled()
|
||||
&& services.admin.user_is_admin(&sender_user).await
|
||||
{
|
||||
scopes.insert(OAuthClientScope::ServerAdministration);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user