After revoking permission from user to work with content templates, primary panel should reflect the change
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3557152. -->
Reported by: [attilatilman](https://www.drupal.org/user/3528404)
Related to !309
>>>
<h3 id="overview">Overview</h3>
<p>Steps to reproduce the issue</p>
<ol>
<li>Log in with a user who has permission to manage content templates </li>
<li>Navigate to Canvas and click content templates on the left primary panel </li>
<li>Click exit Canvas </li>
<li>Revoke the permission from the user so they are no longer allowed to manage content templates </li>
<li>Navigate back to Canvas </li>
</ol>
<p>After these steps the left primary panel is still appears open and a user still can see the Content templates</p>
<h3 id="proposed-resolution">Proposed resolution</h3>
<p>the loadSavedState() function in ui/src/features/ui/primaryPanelSlice.ts takes permissions into account using a function from ui/src/utils/permissions.ts.</p>
issue