I am using responsive FileManager 9.14.0 with TinyMCE 5.0.16 and Laravel 6 running on Nginx 1.16.1
I have the following folder structure:
| public
| |- uploads
| |- thumbs
| |- filemanager
| |- js
| | |- tinymce
| | | |- plugins
| | | | |- responsivefilemanager
| | | | | |- plugin.min.js
I use laravel authentication to protect a 'create' page where the user can add text using tinyMCE and upload images using RFM as tyniMCE plugin.
But RFM is accessible directly if with the following URL
http://www.myhost.test/filemanager/dialog.php
How can I prevent this behavior. I want RFM to be accessible only from the tinyMCE editor.
If it's still relevant, I can show you how I did it in Laravel 8
I proceeded from the opposite - if the user logged in under the admin, then there is no need to check it and therefore
USE_ACCESS_KEYS
doFALSE
, otherwise -TRUE
And therefore, if he is NOT authenticated as an administrator, then he will NOT get access to the ResponsiveFileManager.
To do this, add such a function in the responsive_filemanager / filemanager / config / config.php file somewhere at the beginning of the file.
( Specify your own paths to the files '/vendor/autoload.php' and '/bootstrap/app.php' )
and then this line:
define('USE_ACCESS_KEYS', false);
replace with this:
define('USE_ACCESS_KEYS', use_access_keys());
And one moment. If after that, when opening the FileManager, the following error suddenly pops up: "Undefined variable: lang"
then open responsive_filemanager / filemanager / dialog.php
find the array
$get_params
and in it change like this:'lang' => 'en',