'Create from template' link appears even if the user cannot use templates

Created on 13 September 2024, 2 months ago

Problem/Motivation

When viewing the standard node add form as a user without any permissions to use or manage templates, they can still see the 'Create from template' link at the top of the page. Clicking the link takes them to an access denied page.

Steps to reproduce

Access the add node form for a PATE enabled content type as a user with no PATE related permissions (but still has permissions to create the content type). You should see the link at the top of the page.

Proposed resolution

Check the 'use page templates' permission before displaying the link. I don't think we need a new permission for this?

Remaining tasks

I'll create an MR to check for the 'use page templates' permission before printing the link in pate_form_node_form_alter.

🐛 Bug report
Status

Needs review

Version

1.2

Component

Code

Created by

🇬🇧United Kingdom jphuxley

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024