Feature #32621
Add delete capability to the group upload_access
| Status: | Accepted | Start date: | 2011-12-16 | |
|---|---|---|---|---|
| Priority: | Should have | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | pi1: generally | Spent time: | - | |
| Target version: | 0.0.x WAITING FOR SPONSOR | Estimated time: | 4.00 hours | |
| Votes: | 0 |
Description
It seems that only the owner of the file/record can delete it.
What do you think to add this right to the group upload access ?
function delete_document ($uid,$deleteFile=false, $userUID = 0) {
$doc = $this->getDocument($uid) ;
// DSI change check upload access. Relation = 3
// missing other conditions like plugin config dam record resctrictions ?
// but this must be done in checkAccess()
if ($this->checkAccess($uid,3)) {
$has_uploadaccess=1;
}
// DSI CHANGE add has_uploadaccess
if ($doc['tx_damfrontend_feuser_upload']==$userUID || $has_uploadaccess) {
if ($deleteFile==1){
// TOOO error handling
unlink(PATH_site.$doc['file_path'].$doc['file_name']);
}
$table="tx_dam";
$where="uid=" .intval($uid);
$fields_values=array('deleted'=>'1');
$res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery($table,$where,$fields_values,$no_quote_fields=FALSE);
return $res ;
}
else {
return false;
}
}
History
Updated by Stefan Busemann over 1 year ago
- Category set to pi1: generally
- Status changed from New to Under Review
- Assignee set to Stefan Busemann
- Target version set to 0.9.x
Updated by Stefan Busemann over 1 year ago
- Status changed from Under Review to Accepted
- Target version changed from 0.9.x to 0.0.x WAITING FOR SPONSOR
- Estimated time set to 4.00
yes, it is a useful feature. There must be added changes at more than one function. I move this to the feature requests
Updated by Stefan Busemann over 1 year ago
- Assignee deleted (
Stefan Busemann)