mirror of
https://github.com/stoatchat/stoatchat.git
synced 2026-07-14 13:36:59 +00:00
fix: use the correct permissions
Signed-off-by: ispik <ispik@ispik.dev>
This commit is contained in:
@@ -16,9 +16,9 @@ pub async fn admin_delete_channel(
|
||||
case: Option<&str>,
|
||||
) -> Result<EmptyResponse> {
|
||||
let user = flatten_authorized_user(&auth);
|
||||
if !user_has_permission(user, v0::AdminUserPermissionFlags::ManageAccounts) {
|
||||
if !user_has_permission(user, v0::AdminUserPermissionFlags::ManageChannels) {
|
||||
return Err(create_error!(MissingPermission {
|
||||
permission: "ManageAccounts".to_string()
|
||||
permission: "ManageChannels".to_string()
|
||||
}));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user