Problem/Motivation

When the paragraph type module is enabled and a user does not have add paragraph type permissions - there should not be an Add paragraph button.

Steps to reproduce

- enable Paragraphs Type Permissions submodule
- create a paragraph type 'foo'
- create a content type 'bar' that has a paragraph field type 'foo' and set its Widget type to Paragraphs Browser Classic or Paragraphs Browser EXPERIMENTAL
- login with a user with create 'foo' content permission
- open the add 'foo' content form

Proposed resolution

When building the form elements in the paragraph widgets - a check should be made if the user has access paragraph type permissions and if not - "You are not allowed to add any of the @title types." message should be shown instead of "You did not add any @title types yet.". (fixed in #3205248)
If the user does not have add paragraph permission - no add button should be shown.

Remaining tasks

User interface changes

If the user does not have an add paragraph type permission:
- the add button will be hidden

API changes

Data model changes

Comments

mdobcheva created an issue. See original summary.

lfilipov’s picture

I am interested in this matter - could you please provide the way you have fixed it so we could discuss

mdobcheva’s picture

Status: Active » Needs review
StatusFileSize
new1.25 KB

Patch attached.