mirror of
https://github.com/flarum/core.git
synced 2025-08-24 17:13:44 +02:00
Remove ability for users to delete themselves
This commit is contained in:
@@ -28,7 +28,7 @@ class UsersServiceProvider extends ServiceProvider
|
||||
|
||||
$events->listen(ModelAllow::class, function (ModelAllow $event) {
|
||||
if ($event->model instanceof User) {
|
||||
if (in_array($event->action, ['edit', 'delete']) &&
|
||||
if ($event->action === 'edit') &&
|
||||
$event->model->id == $event->actor->id) {
|
||||
return true;
|
||||
}
|
||||
|
@@ -39,8 +39,6 @@ class ClientAction extends BaseClientAction
|
||||
'core.confirmation_email_sent',
|
||||
'core.controls',
|
||||
'core.delete',
|
||||
'core.delete_account',
|
||||
'core.delete_account_help',
|
||||
'core.delete_forever',
|
||||
'core.deleted',
|
||||
'core.disclose_online',
|
||||
@@ -94,7 +92,6 @@ class ClientAction extends BaseClientAction
|
||||
'core.post_reply',
|
||||
'core.posted_a_reply',
|
||||
'core.posts',
|
||||
'core.posts_will_remain',
|
||||
'core.powered_by_flarum',
|
||||
'core.privacy',
|
||||
'core.profile',
|
||||
@@ -123,7 +120,6 @@ class ClientAction extends BaseClientAction
|
||||
'core.upload',
|
||||
'core.username',
|
||||
'core.username_or_email',
|
||||
'core.username_will_be_released',
|
||||
'core.users',
|
||||
'core.view',
|
||||
'core.viewing_posts',
|
||||
|
Reference in New Issue
Block a user