Fórum

Prevent a user from removing a portlet

thumbnail
Jubril Oyesiji, modificado 11 Anos atrás.

Prevent a user from removing a portlet

Junior Member Postagens: 35 Data de Entrada: 09/02/12 Postagens Recentes
Please how do i prevent a user from removing a portlet from the user's private page

Jubril
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: Prevent a user from removing a portlet

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
What version of Liferay?

6.1 has the concept of a site template that is controlled by the admin. These are portlets the user cannot remove.

The core question, though, is why are you trying to control a user's private page? It's their page to add/remove portlets as they wish. If you have a resource that they need to use, it shouldn't be on their private page it should be perhaps on an org page or elsewhere.
thumbnail
Jubril Oyesiji, modificado 11 Anos atrás.

RE: Prevent a user from removing a portlet

Junior Member Postagens: 35 Data de Entrada: 09/02/12 Postagens Recentes
Maybe i am doing this the wrong way, the idea is when ever a user logs into the application , it should go to their private page and the private page should contain just one portlet ( this has been developed) .the page will be common to all user. I have already developed a filter hook that redirects a user to the private page when the user logs in, and this same filter redirects the user to the users private page if the user attempts to access any other page, problem is i will like to prevent a user from being able to remove the portlet from the page
thumbnail
David H Nebinger, modificado 11 Anos atrás.

RE: Prevent a user from removing a portlet

Liferay Legend Postagens: 14919 Data de Entrada: 02/09/06 Postagens Recentes
Yeah, I'd say it's the wrong way...

Any pages outside of the user's public/private pages are not managed by the user, and you can set up permissions so they can view (use) the portlet w/o being able to configure, add, or remove it.

If you log in as an administrator in a fresh Liferay install, all you see is the Welcome page. This is in the global area and has a url like /web/guest/welcome. You can add a page here, in the global area that is, by default, viewable by everyone. However, you can change the page permissions so Guest does not have view access, but User does. Someone trying to access this page would be forced to log in before they could see it.

Once this page is set up and permissioned, your login action can simply send them to the privileged page in the global scope. Users can use it but not remove it, modify the page, etc.

You can also do this sort of thing for organizations.

Users can always use the dock to move between the global page and their own public/private area (if you really need to support such a thing, which many intranet sites really don't).