User unable to delete uploaded files
Page: 1
Hi,
I have come across a problem today and would appreciate some advice. I have a user who belongs to a client and I have given him "All" permissions to a particular project. I thought that having all permissions would mean that he would see the "Delete" link when he looks at a file listing. However he does not, and hence is unable to delete files that he has uploaded.
I have not previously seen this because I use the service as admin and to be honest no-one else has ever wanted to delete a file before!
So, can anyone enlighten me?
Thanks,
Ian.
--
I have come across a problem today and would appreciate some advice. I have a user who belongs to a client and I have given him "All" permissions to a particular project. I thought that having all permissions would mean that he would see the "Delete" link when he looks at a file listing. However he does not, and hence is unable to delete files that he has uploaded.
I have not previously seen this because I use the service as admin and to be honest no-one else has ever wanted to delete a file before!
So, can anyone enlighten me?
Thanks,
Ian.
--
Thanks, that answers my question. I will take a look at the code and see whether hacking it is something I can cope with :-)
Ian.
--
Ian.
--
I just looked at the code. From the comment above the code it seems to be refering to comments rather than files.
/**
* Check if specific user can delete this comment
*
* @access public
* @param User $user
* @return boolean
*/
function canDelete(User $user) {
if(!$user->isProjectUser($this->getProject())) {
return false;
} // if
if($user->isAdministrator()) {
return true;
} // if
return false;
} // canDelete
Am I looking in the right place?
Ian.
--
/**
* Check if specific user can delete this comment
*
* @access public
* @param User $user
* @return boolean
*/
function canDelete(User $user) {
if(!$user->isProjectUser($this->getProject())) {
return false;
} // if
if($user->isAdministrator()) {
return true;
} // if
return false;
} // canDelete
Am I looking in the right place?
Ian.
--
Excellent, thanks. If I read this code correctly then any project user (isProjectUser is true) would be able to delete files - does that override any permissions that I explicitly set in the permissions window for a user?
(I am assuming that I need just to change the final "return false" in the function to "return true")
Ian.
--
(I am assuming that I need just to change the final "return false" in the function to "return true")
Ian.
--
Topic is locked. If you have something important to say about issues discussed on this page please write at hi@a51dev.com.



