Blogs

The power (user) is back

The title will probably make some people argue that it was never gone on the first place. That's true. But there are some resources out there trying to convince you that   User and Power User roles are basically the same thing. Some even state that  Power User is there for legacy reasons but it's not and will not be used by Liferay in a future. While I'll refrain from making any statements as to what Liferay will do in the future, I think you shold know that currently (which is Liferay version 6.1)  User and  Power User roles provide different permissions set! 
 
The confusion comes partly from the fact that by default all users are assigned to both roles. Thus from user perspective it would theoretically make no difference in which role given permission is set. But keep in mind that users can be removed from  Power User role at any time. So before you do set a permission please think whether it should apply to all users ever (then add it to the User role) or it should only apply to given group of users (if so add it to a specific role - for example Power User)
 

To add to the confusion, in 6.1 a new button called "Clean Up Permissions" showed up in Control Panel. While the description tries its best to describe what it does, it may not be very clear if you believed that User and Power User are the same. To help you better understand, I generated the following table which shows what are the default permissions for Guest, User and Power User roles before and after you click on "Clean Up Permissions"  (click on the screenshot below to download the PDF):         

Liferay 6.1 default permissions (screenshot)

Wow, great job! And really useful information. Thanks a lot, Milen!
Question is if the produced table is what it should be, from http://issues.liferay.com/browse/LPS-25725:

The documentation is not consistent with the implementation, i.e. The user hint indicates that "This process removes the assignment of some permissions on the Guest, User and Power User roles in order to simplify the management of "User Customizable Pages". Notably, "Add To Page" permissions is removed from the Guest, and User role for all portlets. Likewise the same permission is reduced in scope for Power Users from portal wide to scoped to "User Personal Site"." However, the implementation removes "Add To Page" from the Guest and Power User roles on the first execution and from the User on the second execution as described above.
Good question. To be honest with you, I wasn't aware of this issue. If I remember right, the results above are after the first "Clean Up Permissions". However I'll try to double check this.