Foren
Query on You do not have required roles access this portlet
Nithin KV, geändert vor 8 Jahren.
Query on You do not have required roles access this portlet
Junior Member Beiträge: 56 Beitrittsdatum: 23.07.12 Neueste Beiträge
Hi,
I have a portlet embedded in the theme with instancaeble true. I have to use this portlet on same page in two places. But I am getting the error which says "You do not have roles to access this portlet " .. I have also added the below things in portal-ext.properties and liferay-portlet.xml.
Portal-ext.properties
portlet.add.default.resource.check.enabled=true
portlet.add.default.resource.check.whitelist=209_WAR_SampleMenuportlet_D8m4,209_WAR_SampleMenuportlet_E3j7
auth.token.ignore.portlets=209_WAR_SampleMenuportlet_D8m4,209_WAR_SampleMenuportlet_E3j7
Liferay-portlet.xml
<add-default-resource>true</add-default-resource>
<system>true</system>
Anybody has faced this issue earlier ?
I have a portlet embedded in the theme with instancaeble true. I have to use this portlet on same page in two places. But I am getting the error which says "You do not have roles to access this portlet " .. I have also added the below things in portal-ext.properties and liferay-portlet.xml.
Portal-ext.properties
portlet.add.default.resource.check.enabled=true
portlet.add.default.resource.check.whitelist=209_WAR_SampleMenuportlet_D8m4,209_WAR_SampleMenuportlet_E3j7
auth.token.ignore.portlets=209_WAR_SampleMenuportlet_D8m4,209_WAR_SampleMenuportlet_E3j7
Liferay-portlet.xml
<add-default-resource>true</add-default-resource>
<system>true</system>
Anybody has faced this issue earlier ?
Shiva Krishna Goud, geändert vor 8 Jahren.
RE: Query on You do not have required roles access this portlet
Regular Member Beiträge: 110 Beitrittsdatum: 02.01.15 Neueste BeiträgeNithin KV:
Hi,
I have a portlet embedded in the theme with instancaeble true. I have to use this portlet on same page in two places. But I am getting the error which says "You do not have roles to access this portlet " .. I have also added the below things in portal-ext.properties and liferay-portlet.xml.
Portal-ext.properties
portlet.add.default.resource.check.enabled=true
portlet.add.default.resource.check.whitelist=209_WAR_SampleMenuportlet_D8m4,209_WAR_SampleMenuportlet_E3j7
auth.token.ignore.portlets=209_WAR_SampleMenuportlet_D8m4,209_WAR_SampleMenuportlet_E3j7
Liferay-portlet.xml
<add-default-resource>true</add-default-resource>
<system>true</system>
Anybody has faced this issue earlier ?
can you please post the code how you are embedding portlet in theme,
Nithin KV, geändert vor 8 Jahren.
RE: Query on You do not have required roles access this portlet
Junior Member Beiträge: 56 Beitrittsdatum: 23.07.12 Neueste Beiträge
Hi, please find the below code from theme
#set ($portlet_id = '209_WAR_SampleMenuportlet')
#set ($instance_id = 'E3j7')
#set ($SampleMenuPortletId = "${portlet_id}_INSTANCE_${instance_id}")
#set ($queryString = "menuName=product")
$velocityPortletPreferences.setValue("portletSetupShowBorders","false")
$velocityPortletPreferences.setValue("displayStyle", "")
#set($SampleMenuPortletContent = $theme.runtime($SampleMenuPortletId, $queryString,$velocityPortletPreferences.toString()))
$SampleMenuPortletContent
#set ($VOID = $velocityPortletPreferences.reset())
#set ($portlet_id = '209_WAR_SampleMenuportlet')
#set ($instance_id = 'D8m4')
#set ($SampleMenuPortletId = "${portlet_id}_INSTANCE_${instance_id}")
#set ($queryString = "menuName=portal")
$velocityPortletPreferences.setValue("portletSetupShowBorders","false")
$velocityPortletPreferences.setValue("displayStyle", "")
#set($SampleMenuPortletContent = $theme.runtime($SampleMenuPortletId, $queryString,$velocityPortletPreferences.toString()))
$SampleMenuPortletContent
#set ($VOID = $velocityPortletPreferences.reset())
#set ($portlet_id = '209_WAR_SampleMenuportlet')
#set ($instance_id = 'E3j7')
#set ($SampleMenuPortletId = "${portlet_id}_INSTANCE_${instance_id}")
#set ($queryString = "menuName=product")
$velocityPortletPreferences.setValue("portletSetupShowBorders","false")
$velocityPortletPreferences.setValue("displayStyle", "")
#set($SampleMenuPortletContent = $theme.runtime($SampleMenuPortletId, $queryString,$velocityPortletPreferences.toString()))
$SampleMenuPortletContent
#set ($VOID = $velocityPortletPreferences.reset())
#set ($portlet_id = '209_WAR_SampleMenuportlet')
#set ($instance_id = 'D8m4')
#set ($SampleMenuPortletId = "${portlet_id}_INSTANCE_${instance_id}")
#set ($queryString = "menuName=portal")
$velocityPortletPreferences.setValue("portletSetupShowBorders","false")
$velocityPortletPreferences.setValue("displayStyle", "")
#set($SampleMenuPortletContent = $theme.runtime($SampleMenuPortletId, $queryString,$velocityPortletPreferences.toString()))
$SampleMenuPortletContent
#set ($VOID = $velocityPortletPreferences.reset())
Shiva Krishna Goud, geändert vor 8 Jahren.
RE: Query on You do not have required roles access this portlet
Regular Member Beiträge: 110 Beitrittsdatum: 02.01.15 Neueste BeiträgeNithin KV:
Hi, please find the below code from theme
#set ($portlet_id = '209_WAR_SampleMenuportlet')
#set ($instance_id = 'E3j7')
#set ($SampleMenuPortletId = "${portlet_id}_INSTANCE_${instance_id}")
#set ($queryString = "menuName=product")
$velocityPortletPreferences.setValue("portletSetupShowBorders","false")
$velocityPortletPreferences.setValue("displayStyle", "")
#set($SampleMenuPortletContent = $theme.runtime($SampleMenuPortletId, $queryString,$velocityPortletPreferences.toString()))
$SampleMenuPortletContent
#set ($VOID = $velocityPortletPreferences.reset())
#set ($portlet_id = '209_WAR_SampleMenuportlet')
#set ($instance_id = 'D8m4')
#set ($SampleMenuPortletId = "${portlet_id}_INSTANCE_${instance_id}")
#set ($queryString = "menuName=portal")
$velocityPortletPreferences.setValue("portletSetupShowBorders","false")
$velocityPortletPreferences.setValue("displayStyle", "")
#set($SampleMenuPortletContent = $theme.runtime($SampleMenuPortletId, $queryString,$velocityPortletPreferences.toString()))
$SampleMenuPortletContent
#set ($VOID = $velocityPortletPreferences.reset())
in portal-ext file u kept like this portlet.add.default.resource.check.whitelist=209_WAR_SampleMenuportlet_D8m4,209_WAR_SampleMenuportlet_E3j7
but in theme you are using 209_WAR_SampleMenuportlet_INSTANCE_D8m4 ,,please find the portlet ids in portlet_ table and and keep where ever necessary,,Ithink the problem with portlet Ids.
Nithin KV, geändert vor 8 Jahren.
RE: Query on You do not have required roles access this portlet
Junior Member Beiträge: 56 Beitrittsdatum: 23.07.12 Neueste Beiträge
Hi, yes there was an issue with portlet Ids. fixed it.. Thanks