+ throw new ClientException(_('You can only delete local users.'));
+ }
+
+ // Only administrators can delete other privileged users (such as others who have the right to silence).
+ if ($this->profile->isPrivileged() && !$this->scoped->hasRole(Profile_role::ADMINISTRATOR)) {
+ // TRANS: Client error displayed when trying to delete a user that has been granted moderation privileges
+ throw new AuthorizationException(_('You cannot delete other privileged users.'));