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>,
|
case: Option<&str>,
|
||||||
) -> Result<EmptyResponse> {
|
) -> Result<EmptyResponse> {
|
||||||
let user = flatten_authorized_user(&auth);
|
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 {
|
return Err(create_error!(MissingPermission {
|
||||||
permission: "ManageAccounts".to_string()
|
permission: "ManageChannels".to_string()
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user