Forums de discussion

Permission problems as Site Administer

thumbnail
Jonatan Oyola, modifié il y a 9 années.

Permission problems as Site Administer

Regular Member Publications: 193 Date d'inscription: 06/06/07 Publications récentes
Hi,

I have one user as Site Administer, but this user can only add some portlets in the pages. I've attached an screenshot for show it.

I dont know how to do for having full access using this user. I am using liferay 6.1.2.ga3 and SqlServer2008

Thanks on advanced.

Regards
thumbnail
Patrick Wolf, modifié il y a 9 années.

RE: Permission problems as Site Administer

Regular Member Publications: 127 Date d'inscription: 15/09/10 Publications récentes
As detailed in the documentation, « a site administrator role grants the ability to manage almost all aspects of a site including site content, site memberships, and site settings. Site Administrators cannot delete the membership of or remove roles from other Site Administrators or Site Owners. They also cannot assign other users as Site Administrators or Site Owners. »

If you wish to extend your user's permissions, you may promote her/him to site owner.
thumbnail
Jonatan Oyola, modifié il y a 9 années.

RE: Permission problems as Site Administer

Regular Member Publications: 193 Date d'inscription: 06/06/07 Publications récentes
I cant add Asset Publisher into any page as Site Administer. It's wrong!!! A Site Adminitrator must add all the portlets
thumbnail
Jonatan Oyola, modifié il y a 9 années.

RE: Permission problems as Site Administer

Regular Member Publications: 193 Date d'inscription: 06/06/07 Publications récentes
RE: Permission problems as Site Administer
thumbnail
Patrick Wolf, modifié il y a 9 années.

RE: Permission problems as Site Administer

Regular Member Publications: 127 Date d'inscription: 15/09/10 Publications récentes
This is odd! It may be something related to the portlet. Do you have any in-house developped portlets in the categories which are not showing up when logged in as site administrator? If so check out the element tag display in the liferay-display.xml file of the portlet that cannot be visible and added to a site page. It should be a matter of permission on the portlet side.
thumbnail
Jonatan Oyola, modifié il y a 9 années.

RE: Permission problems as Site Administer

Regular Member Publications: 193 Date d'inscription: 06/06/07 Publications récentes
My Configuration:

portlet.xml

<portlet-app version="2.0" xmlns="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd http://java.sun.com/xml/ns/portlet/portlet-app_2_0.xsd">

	<portlet>
		<portlet-name>home</portlet-name>
		<display-name>Home</display-name>
		<portlet-class>com.valkitek.alixpartners.portlets.LiferayMVCPortlet</portlet-class>
		<init-param>
			<name>view-jsp</name>
			<value>/portlets/home/view.jsp</value>
		</init-param>
        <init-param>
            <name>config-jsp</name>
            <value>/portlets/home/configuration.jsp</value>
        </init-param>
		<expiration-cache>0</expiration-cache>
		<supports>
			<mime-type>text/html</mime-type>
		</supports>
		<portlet-info>
			<title>Home</title>
			<short-title>Home</short-title>
			<keywords>Home</keywords>
		</portlet-info>
		<security-role-ref>
			<role-name>administrator</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>guest</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>power-user</role-name>
		</security-role-ref>
		<security-role-ref>
			<role-name>user</role-name>
		</security-role-ref>
	</portlet>
</portlet-app>


lifertay-portlet.xml

<liferay-portlet-app>
	<portlet>
		<portlet-name>home</portlet-name>
		<configuration-action-class>com.liferay.portal.kernel.portlet.DefaultConfigurationAction</configuration-action-class>
		<scheduler-entry>
			<scheduler-event-listener-class>com.valkitek.alixpartners.jobs.UpdateGroupsJob</scheduler-event-listener-class>
			<trigger>
				<simple>
					<simple-trigger-value>60</simple-trigger-value>
					<time-unit>minute</time-unit>
				</simple>
			</trigger>
		</scheduler-entry>
		<instanceable>false</instanceable>
	</portlet>

	<role-mapper>
		<role-name>administrator</role-name>
		<role-link>Administrator</role-link>
	</role-mapper>
	<role-mapper>
		<role-name>guest</role-name>
		<role-link>Guest</role-link>
	</role-mapper>
	<role-mapper>
		<role-name>power-user</role-name>
		<role-link>Power User</role-link>
	</role-mapper>
	<role-mapper>
		<role-name>user</role-name>
		<role-link>User</role-link>
	</role-mapper>
</liferay-portlet-app>


liferay-display.xml

<display>
	<category name="category.alixpartners">
		<portlet id="home" />
		<portlet id="dashboards" />
		<portlet id="logissues" />
	</category>
</display>


Anyway, I've remove all my plugins and the error persit. It works for Portal Administrator.

Thanks!
thumbnail
Patrick Wolf, modifié il y a 9 années.

RE: Permission problems as Site Administer

Regular Member Publications: 127 Date d'inscription: 15/09/10 Publications récentes
<portlet id="home" />
<portlet id="dashboards" />
<portlet id="logissues" />

Try to replace the "id" attribute with an integer. This 'id' must match the portlet name of the portlet.xml file, which should be the same integer. Each one of the integer must be unique.

As an example:
<portlet id="1" />
<portlet id="2" />
<portlet id="3" />
thumbnail
Jonatan Oyola, modifié il y a 9 années.

RE: Permission problems as Site Administer

Regular Member Publications: 193 Date d'inscription: 06/06/07 Publications récentes
Hi, I haven't been able to resolve this issue yet.


// Journal Content
System.out.println(PortletPermissionUtil.contains(permissionChecker, layout, portlet, ActionKeys.ADD_TO_PAGE));

//Asset Publisher
System.out.println(PortletPermissionUtil.contains(permissionChecker, layout, portlet, ActionKeys.ADD_TO_PAGE));


I got: true and false respectively.

I can't understand this result because the user is SITE ADMIN.

ANY IDEA?
thumbnail
Jonatan Oyola, modifié il y a 9 années.

RE: Permission problems as Site Administer

Regular Member Publications: 193 Date d'inscription: 06/06/07 Publications récentes
I've found that the actions for each portlets are diferents, and AssetPublisher doesn't containt the ADD_TO_PAGE action



//Journal Content
for(String str : ResourceActionsUtil.getPortletResourceLayoutManagerActions(portletId)) {
      System.out.println("action:" + str);	
}


Result:

action:ADD_TO_PAGE
action:CONFIGURATION
actionemoticonIEW
actionemoticonERMISSIONS

---


//Asset Publisher
for(String str : ResourceActionsUtil.getPortletResourceLayoutManagerActions(portletId)) {
      System.out.println("action:" + str);	
}


Result:

action:CONFIGURATION
actionemoticonERMISSIONS
actionemoticonREFERENCES
actionemoticonIEW

What is the problem?