protected function getDefaultConfig()
    {
        $defaultConfig = [
            'denyExtensionRename' => true,
            'denyUpdateCheck' => true,
            'dirnameChangeChars' => [' ' => '_', ':' => '_'],
            'disabled' => false,
            'filenameChangeChars' => [' ' => '_', ':' => '_'],
            'jpegQuality' => 100,
            'uploadDir' => UPLOADED,
            'uploadURL' => Router::url('/files', true),
            'types' => $this->getTypes(),
        ];

        //If the user is not and admin
        if (!$this->Auth->isGroup(['admin'])) {
            //Only admins can delete or rename directories
            $defaultConfig['access']['dirs'] = [
                'create' => true,
                'delete' => false,
                'rename' => false,
            ];
            //Only admins can delete, move or rename files
            $defaultConfig['access']['files'] = [
                'upload' => true,
                'delete' => false,
                'copy' => true,
                'move' => false,
                'rename' => false,
            ];
        }

        return $defaultConfig;
    }
protected function getDefaultConfig()
    {
        $defaultConfig = [
            'denyExtensionRename' => true,
            'denyUpdateCheck' => true,
            'dirnameChangeChars' => [' ' => '_', ':' => '_'],
            'disabled' => false,
            'filenameChangeChars' => [' ' => '_', ':' => '_'],
            'jpegQuality' => 100,
            'uploadDir' => UPLOADED,
            'uploadURL' => Router::url('/files', true),
            'types' => $this->getTypes(),
        ];

        //If the user is not and admin
        if (!$this->Auth->isGroup(['admin'])) {
            //Only admins can delete or rename directories
            $defaultConfig['access']['dirs'] = [
                'create' => true,
                'delete' => false,
                'rename' => false,
            ];
            //Only admins can delete, move or rename files
            $defaultConfig['access']['files'] = [
                'upload' => true,
                'delete' => false,
                'copy' => true,
                'move' => false,
                'rename' => false,
            ];
        }

        return $defaultConfig;
    }
protected function getDefaultConfig ( ) { $ defaultConfig = [ 'denyExtensionRename' => true , 'denyUpdateCheck' => true , 'dirnameChangeChars' => [ ' ' => '_' , ':' => '_' ] , 'disabled' => false , 'filenameChangeChars' => [ ' ' => '_' , ':' => '_' ] , 'jpegQuality' => 100 , 'uploadDir' => UPLOADED , 'uploadURL' => Router :: url ( '/files' , true ) , 'types' => $ this -> getTypes ( ) , ] ; //If the user is not and admin if ( ! $ this -> Auth -> isGroup ( [ 'admin' ] ) ) { //Only admins can delete or rename directories $ defaultConfig [ 'access' ] [ 'dirs' ] = [ 'create' => true , 'delete' => false , 'rename' => false , ] ; //Only admins can delete, move or rename files $ defaultConfig [ 'access' ] [ 'files' ] = [ 'upload' => true , 'delete' => false , 'copy' => true , 'move' => false , 'rename' => false , ] ; } return $ defaultConfig ; }
Internal method to get the default config
@return array
@uses getTypes()
Internal method to get the default config