Message Boards

Avoid Web Content creation from Global Structures for certain users

thumbnail
Alessandro Candini, modified 2 Years ago.

Avoid Web Content creation from Global Structures for certain users

Regular Member Posts: 130 Join Date: 10/17/15 Recent Posts

Hi everyone, I have this doubt with Liferay 7.3 DXP.

When I try to create a Web Content inside, let's say, site A, I have the possibility to create a Web Content based on structures stored inside the Global Site.

I would like to avoid that: that structures are shared between site B and site C, but not with site A and so editors of site A only will be confused by that.

Is there a way to achieve this? The first thing came into my mind is creating a specific role "site A editor only" and managing role permissions for users that are editors of site A.

Is that possible? Are there any other workarounds?

Thank you

thumbnail
Fernando Fernandez, modified 2 Years ago.

RE: Avoid Web Content creation from Global Structures for certain users

Expert Posts: 396 Join Date: 8/22/07 Recent Posts

Hi Alessandro,

You probably can do that with a separate instance, that will create, if I'm not wrong, a second "Global" site.

HTH

Fernando

thumbnail
Olaf Kock, modified 2 Years ago.

RE: Avoid Web Content creation from Global Structures for certain users

Liferay Legend Posts: 6403 Join Date: 9/23/08 Recent Posts

Look at Asset Libraries - they can be shared explicitly with the sites that you want to share them with.

Lee Jordan, modified 2 Years ago.

RE: Avoid Web Content creation from Global Structures for certain users

Expert Posts: 449 Join Date: 5/26/15 Recent Posts

I had to do this in 7.0 since there were no asset libraries. Asset libraries would be the way to go now but in my admin theme I hid all templates and structures. Obliterated, gone. Using display none with CSS and sometimes jQuery. So nobody gets anything until ....

I add keywords to an allowed list. If there's a global template in the global site I don't want people to use I remove the word "Global" from the structure and template name. If a user wants to use a local template in their site they are mandated to use the word Local in the name. So when I back up their stuff I know what's a local template what's a global template and so on.

Only stuff on my allow list is allowed to be shown to users. Say I'm working on a new template "TEST - New Template" is only allowed to me, users will not see it until I swap TEST for GLOBAL. So a "Global - Accordion" is allowed to be shown in the menus, a "LEGACY - Accordion" is essentially hidden from everyone. Since my legacy stuff quit working when Velocity all the cruddy templates even in the global site, there's like 100 and we only allow half of them to be used.

So what we should have here and we've needed this for YEARS ... a "withdraw flag" on the templates and structures. I have a tone of old stuff even in Velocity created by someone else in 2013. They are 9 years old, they don't work. I can't delete them because they are being used by content. So yeah what we need is a flag to say "Inactive" "Recalled" "Dangerous To Your Health" "Oh We Were Learning Back Then" ... then I've stopped users selecting temlates I know they don't need to have :)

And yet here we are, still no such ability to recall or withdraw or make inactive, or hide from x y z users, Makes no sense.

Permissions maybe, maybe but permissions are like working in quicksand, you're gonna drown.

In the theme you can figure out if the user is a site owner site admin or portal admin, you can target CSS in the theme at those users too if you add the user type to the body classes in init_custom.ftl which is useful for a lot of things. I can figure out if a site has more active site owners vs site admins.

Lee Jordan, modified 2 Years ago.

RE: Avoid Web Content creation from Global Structures for certain users

Expert Posts: 449 Join Date: 5/26/15 Recent Posts

Additionally the global site is the best place to put stuff that is common for all sites, since it's easy to maintain one copy of a thing. Trying to maintain 500 copies of a thing will get you some grey hairs fast, the global site was always the best part of Liferay from a site management perspective. Asset libraries have potential and aren't complete yet.

Child / Parent sites would also be a good candidate for this there hasn't been much focus recently at Liferay fro multi-site installations. It seems liferay is mainly being developed for smaller and smaller sites these days, some of these changes that are coming in make multi-site pretty horrible to manage.

Another approach could be in the theme settings in Look and Feel XML. So you can add configuration items like toggles and dropdowns that can be changed site by site in Public Pages > Configure. Here there could be a way to arrange templates into "template collections" or folders in the global site and on the public pages > configure you could select which templates are allowed from Global site.

Again if they were focused on Web Content, they seem to be more interested in Content Pages and so we're probbably being left behind in terms of what we need for structures and templates.