Site Administrator cannot add images of global site to current site's web content
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
You are viewing an article from our legacy "FastTrack"
publication program, made available for informational purposes. Articles
in this program were published without a requirement for independent
editing or verification and are provided"as is" without
guarantee.
Before using any information from this article, independently verify its
suitability for your situation and project.
Issue
- Site Administrator cannot see global site and it's content listed when trying to add an image from global site to current site's web content.
- Steps to reproduce:
- Log in as admin.
- Go to the Global site's Documents and Media and upload a basic document (E.g. Sample.png).
- Create a new user (Example User A).
- Create a new blank site (Example Site S1).
- Add user A to site S1 and give him Site Administrator role for that site.
- Log out, and then log in using user A credentials.
- Select site S1.
- Go to Content/Media and start adding a new basic web content. While filling in the content part, click on the + icon and then on the image icon. In the popup window click on Sites in the breadcrumb.
Result: User doesn't see the Global site, user cannot select an image from there.
Expected: User should see the Global site and be able to select an image from it.
Environment
- Liferay 7.0 (SP13)
- Liferay 7.1
- Liferay 7.2
Resolution
- This is probably intended, due to the fact that Site Administrator is a site specific role, so when that role is assigned it applies to a specific scope only (site), and not to some other scope as well (like in this case, to Global).
Therefore user needs to explicitly provide that site admin user with the permission to view the Global scope, this way:
-
- Under Control Panel / Users / Roles create a new regular role, call it for e.g., GlobalView
- Go to its Define Permissions tab, go to Control Panel / Sites / Sites on the left.
- On the right, go to the Resource Permissions section and tick the View option, and to the right of it, click on Change and select the Global site. Save the role.
- Then assign this role to the new user, the site administrator.
- After this the user will see the Global site in the Select File popup window.
Did this article resolve your issue ?