Difference between revisions of "Template:Ckfinder 2.x ACL Examples"

This website contains links to software which is either no longer maintained or will be supported only until the end of 2019 (CKFinder 2). For the latest documentation about current CKSource projects, including software like CKEditor 4/CKEditor 5, CKFinder 3, Cloud Services, Letters, Accessibility Checker, please visit the new documentation website.

If you look for an information about very old versions of CKEditor, FCKeditor and CKFinder check also the CKEditor forum, which was closed in 2015. If not, please head to StackOverflow for support.

(Template contents expanded)
 
(3 intermediate revisions by 2 users not shown)
Line 9: Line 9:
 
This example only refers to file operations in the <code>/Logos</code> folder. It does not restrict operations on the folder, so the user can delete or rename it. In order to limit users' ability to modify the folder itself (not its contents), you should change permissions in the parent folder.
 
This example only refers to file operations in the <code>/Logos</code> folder. It does not restrict operations on the folder, so the user can delete or rename it. In order to limit users' ability to modify the folder itself (not its contents), you should change permissions in the parent folder.
  
==== Example 2 ====
+
=== Example 2 ===
 
The following settings restrict folder operations for the <code>Images</code> resource type.
 
The following settings restrict folder operations for the <code>Images</code> resource type.
  
Line 15: Line 15:
  
 
Now a user can view and create a folder, but he will be unable to rename or delete it.
 
Now a user can view and create a folder, but he will be unable to rename or delete it.
 +
 +
== Explaining Folder Path for Example 1 <br>==
 +
 +
In the first example above the <code>/Logos</code> path was used in ACL definition. It is rather obvious that this is not an absolute path to folder on the server.<br>
 +
 +
Let us assume that the absolute path on server to the application folder is <code>/sites/example.com/</code> and the path to userfiles folder is <code>/sites/example.com/userfiles/</code>.There is also <code>"Images"</code> resource type which in this case points to <code>/sites/example.com/userfiles/images/</code>.<br>
 +
 +
Knowing the above let's define correct path for the <code>Logos</code> folder located in <code>/sites/example.com/userfiles/images/Logos</code>.  The key is to define '''path relative to resource type''' (In this case resource type is <code> "Images" </code> pointing to <code>/sites/example.com/userfiles/images/</code>), thus the value that needs to be assigned to ACL folder property is <code> /Logos/</code>.<br>
 +
 +
Please also note that:
 +
*Folder path has to start from slash character.
 +
 +
*If you use a wildcard for resource type <code>{{{wildcard_resource}}}</code>, CKFinder will look through all resource types and apply ACL to every folder that matches the rule, for example Files:/Logos, Flash:/Logos.
 +
<br>

Latest revision as of 15:51, 7 March 2013

Access Control List Examples

Have a look at the following examples that present various permission configurations in order to learn more about using Access Control Lists in CKFinder.

Example 1

If you want to restrict the upload, renaming, or deletion of files in the Logos folder of the resource type Images, use the following ACL settings.

{{{example1}}}

This example only refers to file operations in the /Logos folder. It does not restrict operations on the folder, so the user can delete or rename it. In order to limit users' ability to modify the folder itself (not its contents), you should change permissions in the parent folder.

Example 2

The following settings restrict folder operations for the Images resource type.

{{{example2}}}

Now a user can view and create a folder, but he will be unable to rename or delete it.

Explaining Folder Path for Example 1

In the first example above the /Logos path was used in ACL definition. It is rather obvious that this is not an absolute path to folder on the server.

Let us assume that the absolute path on server to the application folder is /sites/example.com/ and the path to userfiles folder is /sites/example.com/userfiles/.There is also "Images" resource type which in this case points to /sites/example.com/userfiles/images/.

Knowing the above let's define correct path for the Logos folder located in /sites/example.com/userfiles/images/Logos. The key is to define path relative to resource type (In this case resource type is "Images" pointing to /sites/example.com/userfiles/images/), thus the value that needs to be assigned to ACL folder property is /Logos/.

Please also note that:

  • Folder path has to start from slash character.
  • If you use a wildcard for resource type {{{wildcard_resource}}}, CKFinder will look through all resource types and apply ACL to every folder that matches the rule, for example Files:/Logos, Flash:/Logos.


This page was last edited on 7 March 2013, at 15:51.