#3516641 Permissions in React app
-
Permission check wrapper component -
usePermissionCheckReact hook -
Permissions utility functions -
Has permission -
Has any permission -
Has all permissions
-
-
Administer code components ( xb.permissions.codeComponents)-
Hide the "Add new" button -
Hide “Code” accordion in the left sidebar -
Hide all the items from the ellipsis menu on code components in the library. Ellipsis menu remains because ultimately all component sources will have an ellipsis menu with the “Insert” option in it. -
Display warning when navigating directly to the code editor
-
-
Administer page templates ( xb.permissions.globalRegions)-
Hide “Move to global region” in contextual menu.
-
-
Administer sections ( xb.permissions.sections)-
Hide the “Create section” contextual menu -
Hide the “Delete section” contextual menu
-
-
Create XB Page ( Blocked onhttps://www.drupal.org/project/experience_builder/issues/3529895✅ landed)-
Hide the "New page" button in the navigator component
-
-
Duplicate XB Page -
Hide the "Duplicate page" contextual button on each page in the navigator
-
-
Administer Site Configuration -
Pass this info to FE ( item.links['https://drupal.org/project/experience_builder#link-rel-set-as-homepage``']``) -
Hide set as homepage functionality
-
-
Delete XB Page -
Hide the "Delete page" contextual button on each page in the navigator
-
-
Publish Experience Builder Content -
Pass xb.permissions.publishChanges: boolto FE (https://www.drupal.org/project/experience_builder/issues/3531841✅ landed) -
Hide "Review x changes" button
-
I have also just added (not yet extensive) e2e tests for the following in Playwright:
-
"Create section" is hidden -
"Add new" button for creating a new code component is hidden -
Code accordion in the library is hidden -
Move to global region is hidden -
New page button in the navigator is hidden. -
Publish all changes button is hidden
Edited by Jesse Baker