嗨,他有2个实体和1个portlet:
实体1:Autore 实体2:歌剧 Portlet:BibliotecaWebPortlet
我已经在resource> resource-action中为portlet创建了default.xml:
<?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名称正确)
我在resource> resource-action中为服务创建了default.xml:
<?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>
为什么不在控制面板中显示操作键? (网站>用户>角色>选择我的自定义角色>定义权限>站点管理>应用程序> BibliotecaWebApp)
我只查看默认的键。 >添加到页面-配置-权限-首选项portlet.properties存在于portlet和服务模块中。