CKFinder for PHP 1.2.2
Configuration: Access Control
There are 2 types os users, A and B
All is ok, sessions, users, etc.
I want to restrict the folder access for the "B" user.
The access control code por the A user: (works fine)
The access control code por the B user: (Doesn´t work, withouth error msg).
The folders are Ok, (basedir/image/Folder), so the A user can view all subfolders.... etc etc. What is the problem?
P.D. Great job with this CKFinder, probably I´m going to buy some licenser for my projects.
Configuration: Access Control
There are 2 types os users, A and B
All is ok, sessions, users, etc.
I want to restrict the folder access for the "B" user.
The access control code por the A user: (works fine)
$config['AccessControl'][] = Array( 'role' => 'A', 'resourceType' => '*', 'folder' => '/', 'folderView' => true, 'folderCreate' => true, 'folderRename' => true, 'folderDelete' => true, 'fileView' => true, 'fileUpload' => true, 'fileRename' => true, 'fileDelete' => true);
The access control code por the B user: (Doesn´t work, withouth error msg).
$config['AccessControl'][] = Array( 'role' => 'B', 'resourceType' => 'Images', 'folder' => '/Folder', 'folderView' => true, 'folderCreate' => false, 'folderRename' => false, 'folderDelete' => false, 'fileView' => true, 'fileUpload' => true, 'fileRename' => false, 'fileDelete' => false);
The folders are Ok, (basedir/image/Folder), so the A user can view all subfolders.... etc etc. What is the problem?
P.D. Great job with this CKFinder, probably I´m going to buy some licenser for my projects.
Re: Problem with Access Control
If you're trying to grant user "B" access only to a folder inside of the "Images" resource type, then your settings are almost correct.
To view "Folder", user "B" must have at least folderView permission to the Images resource type.
To give folderView permission to all users, everywhere, add the following:
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Hi Wiktor,
Hi Wiktor,
I appreciete your active involvement regarding ck issues. I have one question. I'm using ckeditor with ckfinder java version. And I have two types of users exactly the same as the one mentioned above "A" and "B". So
==> config.xml
<accessControls>
<accessControl>
<role>admin</role>
<resourceType>*</resourceType>
<folder>/</folder>
<folderView>true</folderView>
<folderCreate>true</folderCreate>
<folderRename>true</folderRename>
<folderDelete>true</folderDelete>
<fileView>true</fileView>
<fileUpload>true</fileUpload>
<fileRename>true</fileRename>
<fileDelete>true</fileDelete>
</accessControl>
<accessControl>
<role>*</role>
<resourceType>*</resourceType>
<folder>/</folder>
<folderView>true</folderView>
<folderCreate>false</folderCreate>
<folderRename>false</folderRename>
<folderDelete>false</folderDelete>
<fileView>true</fileView>
<fileUpload>false</fileUpload>
<fileRename>false</fileRename>
<fileDelete>false</fileDelete>
</accessControl>
==> In my jsp page
if (user.isAdmin()){
request.getSession(true).setAttribute("CKFinder_UserRole","admin");
}
But when I excecute the program, CKFinder_UserRole is null. So I'm not very clear with how config.xml and the pages work in tracking access control. so can you give me some hints please.
Thank you
Dawit
Have you checked this Access
Have you checked this Access Control guide?
Customer and Community Manager, CKSource
Follow us on: Facebook, Twitter, LinkedIn
If you think you found a bug in CKEditor, read this!
Thak you sebstefanov,
Thak you sebstefanov,
I did all the things mentioned in the link you sent me. Does that mean, as soon as I configured the role on the config.xml file, how does the roles detected/ identified when I set them in to session. ie, how does "admin" in context.xml will be matched to the one we store in session request.getSession(true).setAttribute("CKFinder_UserRole","admin"); So I dont understand how context.xml and pages share information.
Thanks again