JorgeFerrer/liferay-portal — pull request #109 by epgarcia (2012-12-21 11:21:15+00:00)
Title: LPS-30435 Non-admin user is unable to reset changes to a page that uses a site template on their personal site

Hey Jorge,

I propose this solution for ticket LPS-30435:

* It's necessary to check both layout-level and group-level update permissions for the reset_prototype action, since apart from updating the layout, any created/deleted layout in the Site template will be merged to the site.

* With Ray's changes for LPS-27608, the group-level update permission check fails for a user in his own group (personal sites).

* I've decided to replace the group-permission check for a user-permission check when the group is a user's personal site only for the reset_prototype action. This way the behaviour is the same as previously, but I do not change Ray's solution for any other cases.

To test this solution, you might need to rever Shinn Lock's recent changes for the reset button in dockbar/view.jsp (see LPS-31519), since the reset button is not working properly.

@rotty3000