Page 1 of 1

Restrict or Hide "Restore" Button From Group

PostPosted:Thu Nov 19, 2015 9:47 pm
by alexwgordon
Hi All!

I had a question regarding the ability to "restore" past revisions of a document. I want to restrict this capability only to a specified group of users. Is this possible to achieve? I see in the Profiles that you can hide the History tab and you can hide the "View" button. But I didn't see anywhere to actually restrict the use of the "restore" button. Thanks guys!

Re: Restrict or Hide "Restore" Button From Group

PostPosted:Sat Nov 21, 2015 9:50 am
by jllort
Should be modify the source code and add into the profiles this control. If you have Java skills I can give you the clues for it.

Re: Restrict or Hide "Restore" Button From Group

PostPosted:Mon Nov 23, 2015 6:14 pm
by alexwgordon
Hi jllort,

I have some skills with working with Java. If you could give me some hints into how to manipulate the source code and change the profiles that'd be great! Thank you!

Re: Restrict or Hide "Restore" Button From Group

PostPosted:Tue Nov 24, 2015 7:26 pm
by jllort
First add at administration, you should see theseclasses:

* com.openkm.dao.bean.Profile
* com.openkm.dao.beanProfileMisc ( I suggest add here the new configuration property )
* com.openkm.servlet.admin.ProfileServlet
* profile_misc.jsp

Now for get some effect on User Interface:

* com.openkm.servlet.frontend.WorkspaceServlet
* com.openkm.frontend.client.bean.GWTWorkspace
* com.openkm.frontend.client.util.WorkspaceUserProperties ( you should call a new method showRestoreButton(), see for example line 160 )
* com.openkm.frontend.client.widget.properties.version.VersionScrollTable ( here should be implemented the showRestoreButton() )