[PAGES-456] Component restrictions are not working Created: 17/Jun/21  Updated: 18/Oct/21  Resolved: 30/Sep/21

Status: Closed
Project: Magnolia pages module
Component/s: None
Affects Version/s: 6.2.9
Fix Version/s: 6.2.12

Type: Bug Priority: Neutral
Reporter: Carlos Cantalapiedra Assignee: Lam Nguyen Bao
Resolution: Fixed Votes: 1
Labels: VN-Analysis, VN-Implementation, VN-Testing, headless-team-support, maintenance
Remaining Estimate: 0.5h
Time Spent: 3d 2.85h
Original Estimate: Not Specified

Attachments: File pages-app.yaml    
Issue Links:
Cloners
is cloned by MGNLPN-583 Component restrictions are not working Closed
Problem/Incident
Relates
relates to PAGES-387 Components Are Still Editable When Ed... Closed
relates to PAGES-450 Writable property doesn't work Closed
relation
is related to PAGES-387 Components Are Still Editable When Ed... Closed
Template:
Acceptance criteria:
Empty
Task DoD:
[X]* Doc/release notes changes? Comment present?
[X]* Downstream builds green?
[X]* Solution information and context easily available?
[X]* Tests
[X]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[X]* Steps to reproduce, expected, and actual results filled
[X]* Affected version filled
Date of First Response:
Epic Link: UI framework implementation
Sprint: HL & LD 37, HL & LD 38
Story Points: 3

 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]


 Comments   
Comment by Leah Staniorski [ 24/Sep/21 ]

This is the same for the editable: false property. Please see linked ticket PAGES-387. Does this fix also include this?

Generated at Mon Feb 12 06:19:07 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.