Uploaded image for project: 'Magnolia pages module'
  1. Magnolia pages module
  2. PAGES-456

Component restrictions are not working

    XMLWordPrintable

Details

    Description

      Steps to reproduce

      1.  Go to our demo (as superuser) and at the Resources app, edit the /mtk/templates/components/html.yaml file
      2.  Regarding our docs, include the following snippet
        deletable: false
        writable: false
        moveable: false
        personalizable: false
      1. Login as eric and open a pager which has an HTML component within it
      2. Check only delete and move are restricted

      Expected results

      The editor can't edit, create component variants, delete or move the HTML component

      Actual results

      The editor can edit and create variants on the restricted HTML component

      Workaround

      The rules are implemented. Just missing in the configuration. Hotfix or decorate the config to add missing rules (not tested).

      Development notes

      Even including this restrictions on the pages.yaml file, the editor con edit and create variants on the HTML component:

      main:
          availableComponents: # using all components from footer plus others
            <<: *footerAvailableComponents
            html:
              id: mtk:components/html
              permissions:
                write:
                  roles: 
                    superuser: superuser
                delete:
                  roles:
                    superuser: superuser
                move:
                  roles:
                    superuser: superuser
                add:
                  roles:
                    superuser: superuser
                personalize:
                  roles: [superuser]
      

      Checklists

        Acceptance criteria

        Attachments

          Issue Links

            Activity

              People

                lam.nguyen Lam Nguyen Bao
                ccantalapiedra Carlos Cantalapiedra
                Votes:
                1 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Checklists

                    Bug DoR
                    Task DoD

                    Time Tracking

                      Estimated:
                      Original Estimate - Not Specified
                      Not Specified
                      Remaining:
                      Time Spent - 3d 2.85h Remaining Estimate - 0.5h
                      0.5h
                      Logged:
                      Time Spent - 3d 2.85h Remaining Estimate - 0.5h
                      3d 2.85h