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