Fórum

Set default permissions on portlet for custom role

thumbnail
Vitaliy Koshelenko, modificado 7 Anos atrás.

Set default permissions on portlet for custom role

Expert Postagens: 319 Data de Entrada: 25/03/11 Postagens Recentes
Hi guys,

I need to set some permissions (VIEW, EDIT, etc.) for my custom role on my custom portlet. This should be applied for all portlet instances (already added to portal pages, or for newly added).
Is there a way to do it programmatically (during app deployment , in hot-deploy listener) ? (I suppose, something like 'Define Permissions' functionality in LR).

Regards,
Vitaliy
thumbnail
David H Nebinger, modificado 7 Anos atrás.

RE: Set default permissions on portlet for custom role

Liferay Legend Postagens: 14917 Data de Entrada: 02/09/06 Postagens Recentes
There's an xml file, usually named default.xml file, where you define your resource permissions and the defaults for guest and site users, but this will not do anything for custom roles.

There's nothing automatic about role setup, but when I need to do things like this I use a startup action. I can query to see if something has been set up (i.e. check if the role has a permission), and if it does just exit from the startup action. If not, you can do what you need to (create the role, assign the permission(s) to the role, ...).





Come meet me at the LSNA!
Daniel G, modificado 6 Anos atrás.

RE: Set default permissions on portlet for custom role

Regular Member Postagens: 141 Data de Entrada: 14/03/17 Postagens Recentes
Hi David.

Is possible to assign permissions to logged users which are not member of a site?. I want to assign permissions to users to create a document in documents and media through a portlet, I am able to do it for users which are members of the site buf not for users which aren't member of it.

Thanks for your help
thumbnail
Stephen Kostas, modificado 6 Anos atrás.

RE: Set default permissions on portlet for custom role

New Member Postagens: 20 Data de Entrada: 02/11/09 Postagens Recentes
I'm not 100% sure, but could it be related to the general document permissions for non-site members ? I think that in order to create documents through a custom portlet, you will need to set the permission for them to add documents at the Site level.
Daniel G, modificado 6 Anos atrás.

RE: Set default permissions on portlet for custom role

Regular Member Postagens: 141 Data de Entrada: 14/03/17 Postagens Recentes
Thanks for your response.

But I think it doesn't what I'm looking for. Non member users only can have that permission through the portlet. I f I give permission to non member users to add folder in document and media, they will can do it always, not only through the portlet