A really quick one, partly as a reference for myself:

FCKEditor includes a load of file manager stuff, so I figured I may as well use it than roll my own – its got a load of features I can’t justify writing too.

The project in question uses symfony (1.2).

Googled, and found that to get it working, I just have to enable/configure it in:

fckeditor/editor/filemanager/connectors/php/config.php

All enabled, worked fine, but I was a bit bothered by this warning:

SECURITY: You must explicitly enable this “connector”. (Set it to “true”).
WARNING: don’t just set “$Config['Enabled'] = true ;”, you must be sure that only
authenticated users can access this file or use some kind of session checking.

So I hooked it up to the symfony permissions system, as below:

In place of:

$Config['Enabled'] = true ;

Use:

require_once($_SERVER['DOCUMENT_ROOT'].'/../config/ProjectConfiguration.class.php');

$configuration = ProjectConfiguration::getApplicationConfiguration('frontend', 'prod', false);
$context = sfContext::createInstance($configuration);

if ($context->getUser()->isSuperAdmin()) {
$Config['Enabled'] = true ;
} else {
$Config['Enabled'] = false ;
}

It loads your symfony projects config, gets a context object and then uses that to get the user and check whether we are a super admin. You could alternatively create a credential and check for it with hasCredential().

Hope to help someone!