Dobrý den, abyste to rozchodil, stačí v konfiguračním souboru config.php změnit definici funkce
CheckAuthentication() a sice příkaz
return false; nahradit příkazem
return true;.
Takže po úpravě bude definice vypadat takto:
Kód:
function CheckAuthentication()
{
// WARNING : DO NOT simply return "true". By doing so, you are allowing
// "anyone" to upload and list the files in your server. You must implement
// some kind of session validation here. Even something very simple as...
// return isset($_SESSION['IsAuthorized']) && $_SESSION['IsAuthorized'];
// ... where $_SESSION['IsAuthorized'] is set to "true" as soon as the
// user logs in your system.
// To be able to use session variables don't forget to add session_start().
return true;
}
Musíte si ale dát pozor, aby kdokoliv nemohl pomocí CKFinderu dělat operace se soubory (uploadovat, mazat). Toho lze dosahnout adekvátní modifikací funkce CheckAuthentication(), tj. že tam nubude jen return true; ale že návratový kód funkce bude záviset na tom, jestli uživatel bude příhlášený. Další možností je zavést autorizaci pomocí HTTP přes .htaccess a .htpasswd.