mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-29 13:10:06 +02:00
Disable attachments form if user is not allowed to edit the element.
This commit is contained in:
parent
67fe47bbb9
commit
2e318f9ea1
2 changed files with 3 additions and 1 deletions
|
@ -109,6 +109,7 @@ class BaseEntityAdminForm extends AbstractType
|
|||
'allow_add' => true,
|
||||
'allow_delete' => true,
|
||||
'label' => false,
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
|
||||
'entry_options' => [
|
||||
'data_class' => $options['attachment_class'],
|
||||
],
|
||||
|
|
|
@ -198,7 +198,8 @@ class UserAdminForm extends AbstractType
|
|||
'entry_options' => [
|
||||
'data_class' => $options['attachment_class'],
|
||||
],
|
||||
'by_reference' => false
|
||||
'by_reference' => false,
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
|
||||
]);
|
||||
|
||||
//Buttons
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue