mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-03 15:04:32 +02:00
Show a notice above the permission editor, that permissions can depend on each other
Related to issue #435
This commit is contained in:
parent
84c111ac7c
commit
4b88de9316
3 changed files with 14 additions and 0 deletions
|
@ -45,6 +45,9 @@ class PermissionsType extends AbstractType
|
|||
$resolver->setDefaults([
|
||||
'show_legend' => true,
|
||||
'show_presets' => false,
|
||||
'show_dependency_notice' => static function (Options $options) {
|
||||
return !$options['disabled'];
|
||||
},
|
||||
'constraints' => static function (Options $options) {
|
||||
if (!$options['disabled']) {
|
||||
return [new NoLockout()];
|
||||
|
@ -60,6 +63,7 @@ class PermissionsType extends AbstractType
|
|||
{
|
||||
$view->vars['show_legend'] = $options['show_legend'];
|
||||
$view->vars['show_presets'] = $options['show_presets'];
|
||||
$view->vars['show_dependency_notice'] = $options['show_dependency_notice'];
|
||||
}
|
||||
|
||||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue