The forum operates in read-only mode. Please head to StackOverflow for support.
session_start(); $config['RoleSessionVar'] = 'CKFinder_UserRole'; $_SESSION['CKFinder_UserRole'] = !empty($_COOKIE['ckf_role']) ? strtolower($_COOKIE['ckf_role']) : "none";
// Block all actions for 'everyone' $config['AccessControl'][] = array( 'role' => '*', 'resourceType' => '*', 'folder' => '/', 'folderView' => false, 'folderCreate' => false, 'folderRename' => false, 'folderDelete' => false, 'fileView' => false, 'fileUpload' => false, 'fileRename' => false, 'fileDelete' => false ); // Admin $config['AccessControl'][] = Array( 'role' => 'admin', 'folderView' => true, 'folderCreate' => true, 'folderRename' => true, 'folderDelete' => true, 'fileView' => true, 'fileUpload' => true, 'fileRename' => true, 'fileDelete' => true ); // User $config['AccessControl'][] = array( 'role' => 'user', 'folderView' => true, 'folderCreate' => true, 'folderRename' => false, 'folderDelete' => false, 'fileView' => true, 'fileUpload' => true, 'fileRename' => false, 'fileDelete' => false );
Re: PHP: CKFinder AccessControl and RoleSessionVar problem
Here's my solution (for others who may have ran into this problem):