Message Boards
Defining permission dont work
Cristian Vallecchia, modified 4 Years ago.
Defining permission dont work
New Member Posts: 11 Join Date: 7/27/19 Recent PostsHi.
Hi have 2 entity and 1 portlet:
Entity 1: Autore
Entity 2: Opera
Portlet: BibliotecaWebPortlet
I have create a default.xml for the portlet in resource>resource-action :
<?xml version="1.0"?>
<!DOCTYPE resource-action-mapping PUBLIC "-//Liferay//DTD Resource Action Mapping 7.1.0//EN" "http://www.liferay.com/dtd/liferay-resource-action-mapping_7_1_0.dtd">
<resource-action-mapping>
<portlet-resource>
<portlet-name>it_cloudtec_biblioteca_portlet_BibliotecaWebPortlet</portlet-name>
<permissions>
<supports>
<action-key>AGGIUNGI_AL_TEMPLATE</action-key>
<action-key>CONFIGURAZIONE</action-key>
<action-key>VISUALIZZA</action-key>
</supports>
<site-member-defaults>
<action-key>VISUALIZZA</action-key>
</site-member-defaults>
<guest-defaults>
<action-key>VISUALIZZA</action-key>
</guest-defaults>
<guest-unsupported>
<action-key>AGGIUNGI_AL_TEMPLATE</action-key>
<action-key>CONFIGURAZIONE</action-key>
</guest-unsupported>
</permissions>
</portlet-resource>
</resource-action-mapping>
(Portlet name is correct)
i have created default.xml for service in resource>resource-action:
<?xml version="1.0"?>
<!DOCTYPE resource-action-mapping PUBLIC "-//Liferay//DTD Resource Action Mapping 7.1.0//EN" "http://www.liferay.com/dtd/liferay-resource-action-mapping_7_1_0.dtd">
<resource-action-mapping><model-resource>
<model-name>it.cloudtec.biblioteca</model-name>
<portlet-ref>
<portlet-name>it_cloudtec_biblioteca_portlet_BibliotecaWebPortlet</portlet-name>
</portlet-ref>
<root>true</root>
<weight>1</weight>
<permissions>
<supports>
<action-key>AGGIUNGI</action-key>
</supports>
<site-member-defaults>
</site-member-defaults>
<guest-defaults />
<guest-unsupported>
</guest-unsupported>
</permissions>
</model-resource><model-resource>
<model-name>it.cloudtec.biblioteca.model.Autore</model-name>
<portlet-ref>
<portlet-name>it_cloudtec_biblioteca_portlet_BibliotecaWebPortlet</portlet-name>
</portlet-ref>
<weight>2</weight>
<permissions>
<supports>
<action-key>AGGIUNGI_AUTORE</action-key>
<action-key>CANCELLA_AUTORE</action-key>
<action-key>AGGIORNA_AUTORE</action-key>
<action-key>VISUALIZZA_LISTA_AUTORI</action-key>
</supports>
<site-member-defaults>
<action-key>VISUALIZZA_LISTA_AUTORI</action-key>
</site-member-defaults>
<guest-defaults>
<action-key>VISUALIZZA_LISTA_AUTORI</action-key>
</guest-defaults>
<guest-unsupported>
<action-key>AGGIUNGI_AUTORE</action-key>
<action-key>CANCELLA_AUTORE</action-key>
<action-key>AGGIORNA_AUTORE</action-key>
</guest-unsupported>
</permissions>
</model-resource>
</resource-action-mapping>
Why dont show the action key in control panel? (Website > user > role s > select my custom role > define permission > site administration > application >BibliotecaWebApp)
I view only default's keys. > Add to Page - Configuration - Permissions - Preferences portlet.properties is present in portlet and service modules.