xwikisas / application-licensing

Manage and enforce application licenses for pro extensions
GNU Lesser General Public License v2.1
1 stars 8 forks source link

Write protection should still allow to restore a protected page to the "factory version" #80

Open lucaa opened 4 years ago

lucaa commented 4 years ago

Somehow, through a bug of the licensor (that I don't know how to reproduce), on XPoll 2.0.1 on XWiki 10.11.9, I managed to edit the page XPoll.XPollClass to change the parameters of a property from the class, with a regular admin user. Then, the licensor started to work (after saving the change on the class page or something like this).

As a result, I had no way to rollback my change, because edit on the page has started to be protected. I think it would be useful to still be allow an admin to restore the page to the factory version of the pro extension installed, even if modifying is protected.

Licensor version installed: 1.15.

lucaa commented 4 years ago

Somehow, through a bug of the licensor (that I don't know how to reproduce), on XPoll 2.0.1 on XWiki 10.11.9, I managed to edit the page XPoll.XPollClass to change the parameters of a property from the class, with a regular admin user.

This is definitely a bug of something (licensor or xpoll application), but I don't know how to reproduce it so that I can report it. I reproduced on a subwiki with the licensor installed on far, and xpoll installed on the subwiki (in case it matters).

mflorea commented 4 years ago

@lucaa I don't agree. I think we should keep things simple: if you have the right to edit the page then you can restore any version of that page. Otherwise you can't. I wouldn't implement an exception to this rule just because there is a bug. I'd rather fix the bug to avoid the need. If you hit the bug then you can use the superadmin to restore the page.