mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-10 17:29:34 +01:00
Disable attachments form if user is not allowed to edit the element.
This commit is contained in:
@@ -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'],
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user