Forums de discussion

Owner user can't change permissions

thumbnail
Habib Zare, modifié il y a 10 années.

Owner user can't change permissions

Junior Member Publications: 58 Date d'inscription: 28/10/12 Publications récentes
Hello,

I'm developing a portlet with a custom model created with Service Builder. I've implemented all the permissions related stuff and the permissions system is working properly except for the permission settings page. Testing with a normal user, I've seen that it's able to create, update and delete model objects properly, but when accesing the permission settings page for a model object of its own it shows the "You do not have the required permissions." message.

Debugging the Liferay code I've seen that the permission settings page checks the user permissions with the "PermissionService.checkPermission" service. Looking at the implementation code of the service, I've seen a big "if" that is selecting the way to check permissions based on the class name received as a parameter, and if no special case is defined, it uses "permissionChecker.hasPermission" function that only checks user permissions, omitting the owner permissions.

How can I do liferay to use my own function to check the permissions?

I'm using Liferay 6.0.6.


i have created permission tag .


<%
		actionId = "PERMISSIONS";
	%>

	<c:if test="<%= BookPermission.contains(permissionChecker, primKey, actionId) %>">
				<liferay-security:permissionsurl modelResource="<%= Book.class.getName() %>" modelResourceDescription="<%= HtmlUtil.unescape(myBook.getTitle()) %>" resourcePrimKey="<%= String.valueOf(primKey) %>" var="permissionsURL" />

				<liferay-ui:icon image="permissions" url="<%= permissionsURL %>" />
	</c:if>




in the BookPermission.contains method i checked the permissionChecker.hasOwnerPermission(...)

it returns true for book owner(user created the book) but the the owner cannot change the permission.(the permission page throws the exeption);

whats the matter.?
thumbnail
Habib Zare, modifié il y a 10 années.

RE: Owner user can't change permissions

Junior Member Publications: 58 Date d'inscription: 28/10/12 Publications récentes
forum is very bad.