1

I would like to restrict access to a dialog's field (input field) to a given role. Only specific role can enter the value in the the input field others can read only the field.

I looked into the Dialog Definition documentation of Magnolia CMS and found nothing on this topic.

Need code like

   id:
      label: Model ID
      $type: textField
      roles:
          - superuser
        # could also be written as
        # roles: [superuser]
Anthon
  • 69,918
  • 32
  • 186
  • 246
Rajaguru
  • 19
  • 1
  • 4

1 Answers1

1

Might be duplicate of Magnolia CMS: permission to edit dialog

Anyhow, you can restrict either Path that user can access or you can restrict actions that user can invoke. In former case, user will still be able to open the dialog and see the values in it in read only mode.

In latter user will not be able to open dialog or if you also apply same availability rules on the commit action in the dialog itself, user would not be able to save the dialog even if you failed to restrict all the actions that lead to opening the dialog.

But all in all it is important to remember that there are multiple ways to access the content hence if you want to restrict someone from either modifying or seeing certain content, you should restrict content by type/path not just hide the dialog.

Jan
  • 4,369
  • 14
  • 25