I would like to do simillar change described in http://forum.openkm.com/viewtopic.php?f=4&t=3072
but with folder permissions
I would like to allow to change folder permissions only for admin and author of this folder
So I found place where I Should do this
at TabFolder.java there is this code
any help?
EDIT
ok so I found this
but with folder permissions
I would like to allow to change folder permissions only for admin and author of this folder
So I found place where I Should do this
at TabFolder.java there is this code
Code: Select all
as I understand I should change if statement to something like public void setProperties(GWTFolder folder) {
this.folder.set(folder);
security.setPath(folder.getPath());
security.GetGrands();
if ((folder.getPermissions() & GWTPermission.WRITE) == GWTPermission.WRITE) {
security.setChangePermision(true);
} else {
security.setChangePermision(false);
}
}
Code: Select all
but I didn't figure out what this 'something' should beif(Main.get().workspaceUserProperties.getWorkspace().isAdmin() || something.isAuthor() )
any help?
EDIT
ok so I found this
Code: Select all
is that correct?if ( folder.getAuthor().compareTo(Main.get().workspaceUserProperties.getUser() == 0 || Main.get().workspaceUserProperties.getWorkspace().isAdmin() )