MantisBT - Pending Requests
View Issue Details
0001286Pending Requests[All Projects] Generalpublic2013-03-07 01:502013-07-04 23:24
Reportercarlosazevedo 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionsuspended 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0001286: FIX: A folder cannot be edited, failing with a permissions error
DescriptionThis is because of the default way edit permissions are checked. The fix involves adding the following method to the bottom of the 'folders.class.php' file in the 'files' module directory:

    // This is a hack to allow editing a folder. If the logged in user
    // has a file inside of which it is the owner its assumed that (s)he
    // may edit the folder. This is done with a query.
    public function canEdit() {
        $q = $this->_getQuery();
        $q->addTable('files');
        $q->addQuery('files.file_id');
        $q->addWhere('file_folder = ' . (int)$file_folder_id);
        $q->addWhere('file_owner = ' . $this->_AppUI->user_id);

        // counts total recs from query
        return count($q->loadList()) > 0;
    }
TagsNo tags attached.
duplicate of 0001277closed caseydk v3.0 Release Can't edit existing folders 
Attached Files

Notes
(0002848)
caseydk   
2013-03-13 22:10   
Closed in favor of the original report.

Issue History
2013-03-07 01:50carlosazevedoNew Issue
2013-03-13 22:08caseydkRelationship addedduplicate of 0001277
2013-03-13 22:10caseydkNote Added: 0002848
2013-03-13 22:10caseydkStatusnew => closed
2013-03-13 22:10caseydkResolutionopen => suspended
2013-07-04 23:24caseydkProjectv3.0 Release => Pending Requests