How to resolve "User 'x' must have 'y' permission" errors encountered while performing staging publication processes
How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!
While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.
legacy-article
learn-legacy-article-disclaimer-text
Environment
- DXP 7.0
- DXP 7.1
- DXP 7.2
- DXP 7.3
Resolution
- This type of error is encountered when a user attempts to perform an action for which they do not have the necessary permissions, as defined in the portal/portlet's resource actions (of which there are two kinds: portlet resources and model resources). Each resource can be applied to four scopes: company, group, group-template, or individual.
- To better pinpoint the permission needed for the action, we can look at the Liferay source code where the model/portlet resource actions are defined, such as this portal.xml file. Since the warning mentions
com.liferay.portal.kernel.model.Group, we can look at the section starting in line 50 (which does include the EXPORT_IMPORT_LAYOUT permission (line 69 within the list)), and deduce based on the portlet-ref section that the permission missing is regarding Group Pages/Site Admin/Site Settings (i.e., a general "group" resource permission (usually found under the "Control Panel" primary section) involving exporting pages within sites).
- So, to resolve the warnings in the examples above the needed permission can be added in the Live bundle by defining the following permission as a part of this user's role:
-
Control Panel > Sites > Sites > Resource Permissions > Site > Export/Import Pages
did-this-article-resolve-your-issue