Relocate some access check code

This commit is contained in:
Slavi Pantaleev
2024-09-19 10:02:23 +03:00
parent fb1f16aa40
commit 324c8a976f
10 changed files with 56 additions and 59 deletions

View File

@@ -40,7 +40,7 @@ async fn dispatch_config_related_handler(
bot: &Bot,
) -> anyhow::Result<()> {
if let SettingsStorageSource::Global = config_type {
if !message_context.sender_can_manage_global_config()? {
if !message_context.sender_can_manage_global_config() {
bot.messaging()
.send_error_markdown_no_fail(
message_context.room(),