panel.user.delete
Permission to delete a user
Target Data
ui
$this->target()->user()
action
$this->target()->user()
Example
<?php
// site/roles/editor.php
return [
'name' => 'Editor',
'default' => false,
'permissions' => [
'*' => true,
'panel.user.delete' => false
]
];
Allow to delete yourself
<?php
// site/roles/editor.php
return [
'name' => 'Editor',
'default' => false,
'permissions' => [
'*' => true,
'panel.user.delete' => function() {
return $this->user()->is($this->target()->user());
}
]
];