Commit 12e46553 authored by slashrsm's avatar slashrsm
Browse files

Merge pull request #13 from primsi/2555437_require_perms

Issue #2555437 by Primsi: Users without dropzone upload permissions s…
parents a985b095 686343dd
......@@ -76,6 +76,11 @@ class DropzoneJs extends FormElement {
'#attributes' => ['data-upload-path' => \Drupal::url('dropzonejs.upload')],
if (!\Drupal::currentUser()->hasPermission('dropzone upload files')) {
$element['#access'] = FALSE;
drupal_set_message("You don't have sufficent permissions to use the DropzoneJS uploader. Contact your system administrator", 'warning');
return $element;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment