Hi,
I am new to CKEditor and CKFinder but have configured both to work together. The problem I face is that in my application I only want a user to be able to load and then browse from a directory specific to that user. The user will already be authenticated in the application by the time they hit the images button in CKEditor but I can only get the user to see all directories or none, not just a directory specifically named/created for them.
I am using the java version and using javascript to configure.
This post details what I want to do http://cksource.com/forums/viewtopic.php?f=10&t=22552, but I have installed the java version on glassfish and do not know where the config file is? Is it confgi.js in the ckfinder root? If so how does anyone have and example I could look at?
thanks
chris
Thanks in advance
Chris
Mon, 06/20/2011 - 18:46
#1
Re: Restict User Access
Hi Chris,
In all other server side versions of CKFinder, configuration files that keep baseDir and baseUrl settings are executable server side files that can include custom server side code. In case of CKFinder for Java the situation is a bit different, because the main (server side) configuration file is an XML file (WEB-INF/config.xml).
The following article explains how you can set custom baseDir/baseUrl paths in a Java class (based on session variables for example): modifying the baseDir and baseURL Values. If you can set some session variables that would point to the right folder once user authenticates himself, I believe there is no need to use instance ID.
baseDir and baseUrl are explained in a separate article.
Please let me know if you have any further questions.
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+
Re: Restict User Access
Thanks for Replying Wiktor
I am going to do as your reply suggests but get an error when opening the mavan project. If I open the ckfinder\_sources\CKFinder for Java\pom.xml in netbeans I get teh following error when I do a clean and build:
...
Downloaded: http://repo1.maven.org/maven2/org/apach ... ent-15.pom (31 KB at 65.7 KB/sec)
Downloading: http://repo1.maven.org/maven2/Thumbnail ... -0.3.3.pom
The POM for Thumbnailator:Thumbnailator:jar:0.3.3 is missing, no dependency information available
...
Failed to execute goal on project CKFinder: Could not resolve dependencies for project com.ckfinder:CKFinder:jar:2.0.2.1: Could not find artifact Thumbnailator:Thumbnailator:jar:0.3.3 in central (http://repo1.maven.org/maven2) -> [Help 1]
Can I get around this?
Thanks
Chris
Re: Restict User Access
Right click on Thumbnailator-0.3.3.jar, choose "Manually install artifact", browse to [ckfinder]/ _sources/CKFinder for Java/CKFinder/lib/Thumbnailator-0.3.3.jar and confirm selection by clicking on "Install locally".
Wiktor Walc
CTO, CKSource - http://cksource.com
--
Follow CKEditor on: Twitter | Facebook | Google+