Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Jubril Adisa
Prevent a user from removing a portlet
3 de Julho de 2012 12:14
Resposta

Jubril Adisa

Ranking: Junior Member

Mensagens: 35

Data de entrada: 9 de Fevereiro de 2012

Mensagens recentes

Please how do i prevent a user from removing a portlet from the user's private page

Jubril
David H Nebinger
RE: Prevent a user from removing a portlet
3 de Julho de 2012 12:58
Resposta

David H Nebinger

Ranking: Liferay Legend

Mensagens: 4496

Data de entrada: 1 de Setembro de 2006

Mensagens 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.
Jubril Adisa
RE: Prevent a user from removing a portlet
3 de Julho de 2012 13:45
Resposta

Jubril Adisa

Ranking: Junior Member

Mensagens: 35

Data de entrada: 9 de Fevereiro de 2012

Mensagens 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
David H Nebinger
RE: Prevent a user from removing a portlet
3 de Julho de 2012 14:32
Resposta

David H Nebinger

Ranking: Liferay Legend

Mensagens: 4496

Data de entrada: 1 de Setembro de 2006

Mensagens 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).