• Compact History Button

  • OpenKM has many interesting features, but requires some configuration process to show its full potential.
OpenKM has many interesting features, but requires some configuration process to show its full potential.
Forum rules: Please, before asking something see the documentation wiki or use the search feature of the forum. And remember we don't have a crystal ball or mental readers, so if you post about an issue tell us which OpenKM are you using and also the browser and operating system version. For more info read How to Report Bugs Effectively.
 #3072  by QStorm
 
Hello,

my question is:
Is there a way to remove oder deaktivate the Compact History Button.
The reason fot that is if somebody is hitting the button an click\'s on the yes button the history of the file is gone.

Image
thanks a lot

Q-Storm
 #3142  by QStorm
 
Hello,

is there a way to deaktivate the button ? Nobody ever thought about that ?

Q-Storm
 #3144  by jllort
 
For it now you might recompile OpenKM GWT disabled this button, really it\'s easy to do.

There\'s no way on configuration, now, to disable it, you consider is good idea to set it ? and for all users or only for some ones ?
 #3150  by QStorm
 
I just want to disable it for regular users with no adminRol for example oder for all users Exept the admin. you know just to keep people from deleting the history be mistake or they think they don\'t need it anymore or whatever..
 #3160  by jllort
 
You must change gwt code es/git/openkm/client/frontend/client/Main.java ( that\'s the main class starting gwt ).

In starting we get user name ( getWorkspace method ) and then you might do some conditional on button logic. ( button must appear under widget/properties/ some class into )
 #3729  by jlk
 
This is an interesting topic. I am evaluating OpenKM for use. However, without an easy way to limit the use of this button I can't recommend that we use this product. If I understand this thread correctly, any user with access to a folder can delete all previous versions of a file. That is too much power for the average user. Are there plans to change this so that administrators can disable the button by user permissions or some other method?
 #3754  by jllort
 
Really your question goes in direction of having more grants levels, like delete and compact history level no ?
 #3764  by jlk
 
Yes! And thanks for your reply. I view this feature as a pre-requisite for use as it gives the avg user too much opportunity to accidentally and permanently delete previous versions. I would recommend treating compact and delete separately from the grant level perspective.
 #3779  by jlk
 
Can anyone provide guidance on a quick way to disable the "Compact History" button to anyone except those with admin role? No docs (at least in english), limited admin via gui, undocumented workflow functionality....I'm willing to live with certain limitations because the product is promising in many other ways. But without a way to prevent a user from deleting file history is a problem I can't live with. Should I move on and start evaluating other doc mgmt alternatives?
 #3782  by jllort
 
It's simply.

Take a look at class WorkspaceUserProperties.java
Code: Select all
Main.get().mainPanel.bottomPanel.userInfo.setUser(user, result.isAdmin());
Here we know if user has admin role or not, this information is saved in the same class in
Code: Select all
private GWTWorkspace workspace;
and can be get calling by other classes calling
Code: Select all
Main.get().workspaceUserProperties.getWorkspace()
The button is on class VersionScrollTable.java you must change
Code: Select all
if (versionList.size()>1) {
				purge.setEnabled(true);
			} else {
				purge.setEnabled(false);
			}
to
Code: Select all
if (versionList.size()>1 && Main.get().workspaceUserProperties.getWorkspace().isAdmin()) {
				purge.setEnabled(true);
			} else {
				purge.setEnabled(false);
			}

Note: I've put in our tracking system this issue to evaluate possibles changes in newer OpenKM version to solve this inconvenience
 #4004  by pavila
 
jlk wrote:Yes! And thanks for your reply. I view this feature as a pre-requisite for use as it gives the avg user too much opportunity to accidentally and permanently delete previous versions. I would recommend treating compact and delete separately from the grant level perspective.
Please, can you file an issue at http://issues.openkm.com so we can add this feature to the next OpenKM release?

About Us

OpenKM is part of the management software. A management software is a program that facilitates the accomplishment of administrative tasks. OpenKM is a document management system that allows you to manage business content and workflow in a more efficient way. Document managers guarantee data protection by establishing information security for business content.