andrew...@gmail.com
unread,May 15, 2013, 1:36:42 PM5/15/13Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to moll...@googlegroups.com
I wanted my users to be able to upload files, but not to delete the files (both theirs and others).
Edits in FilesystemController.class.php
Line 416 and beyond edited to the following function:
public function delete($item) {
Logging::logDebug('deleting ['.$item->id().']');
//next line was added on 5.7.2013 to prevent non admins from deleting user files.
if (!$this->env->authentication()->isAdmin()) return;
if (!$item->isFile()) $this->env->features()->assertFeature("folder_actions");
$this->assertRights($item, Authentication::RIGHTS_WRITE, "delete");
$item->delete();
if ($this->env->features()->isFeatureEnabled("descriptions"))
$this->env->configuration()->removeItemDescription($item);
$this->env->configuration()->removeItemPermissions($item);
$this->env->events()->onEvent(FileEvent::delete($item));
$this->idProvider->delete($item);
}