When integrating CKEditor and CKFinder into your symfony application, you have to modify the ckfinder/config.php-file, to check if the user has the permissions to use the CKFinder als file-browser.
It's that easy (we asume, CKFinder is located in /web/js/ckfinder):
function CheckAuthentication() { require_once(dirname(__FILE__).'/../../../config/ProjectConfiguration.class.php'); $configuration = ProjectConfiguration::getApplicationConfiguration('yourApplicationName', 'prod', false); $context = sfContext::createInstance($configuration); if ($context->getUser()->functionToCheckPermission()) return true; else return false; }
So finally you just have to implement a method in your myUser.class.php-file, that checks whether the user may or may not use CKFinder!