Hi

just upgraded to ckfinder 2.1.

I want to restrict access (rename and delete) to a role 'editor', webmaster and administrator have all access.

this is what I tried with no result, they all have the same rights (all rename and delete)

$config['RoleSessionVar'] = 'CKFinder_UserRole';
//session_start();
/*
AccessControl : used to restrict access or features to specific folders.

Many "AccessControl" entries can be added. All attributes are optional.
Subfolders inherit their default settings from their parents' definitions.

	- The "role" attribute accepts the special '*' value, which means
	  "everybody".
	- The "resourceType" attribute accepts the special value '*', which
	  means "all resource types".
*/
// first limit the default user rights
$config['AccessControl'][] = Array(
		'role' => '*',
		'resourceType' => '*',
		'folder' => '/',

		'folderView' => true,
		'folderCreate' => true,
		'folderRename' => false,
		'folderDelete' => false,

		'fileView' => true,
		'fileUpload' => true,
		'fileRename' => false,
		'fileDelete' => false);

// add some rights for webmasters and admins
$config['AccessControl'][] = Array(
		'role' => 'webmaster',
		'resourceType' => '*',
		'folder' => '/',

		'folderView' => true,
		'folderCreate' => true,
		'folderRename' => true,
		'folderDelete' => true,

		'fileView' => true,
		'fileUpload' => true,
		'fileRename' => true,
		'fileDelete' => true);

$config['AccessControl'][] = Array(
		'role' => 'administrator',
		'resourceType' => '*',
		'folder' => '/',

		'folderView' => true,
		'folderCreate' => true,
		'folderRename' => true,
		'folderDelete' => true,

		'fileView' => true,
		'fileUpload' => true,
		'fileRename' => true,
		'fileDelete' => true);

Comments

blueblot’s picture

is this a common issue and more important, how to get it working?

thx
blueblot

blueblot’s picture

nobody?

mkesicki’s picture

Title: Accesscontrol » Improve accesscontrol for CKFinder.
Category: bug » feature
Status: Active » Postponed

Hi,
in this moment all access control to CKFinder is done with "allow CKFinder file uploads" user's permission.
There is no way to add role or something like this , so you can't give special permissions (like view, rename, delete) to directories or files.
I change your issue to future request.