Page 1 of 1
Import CSV as ordinary user
Posted: 2019-03-22 12:39
by bescott53
Hi there, i am wanting to give access to admin/pageUploadCSV.php to a couple of ordinary users (dont want to give them admin access)
I copied over the page from admin, updated the header includes/required but i am getting a 500 error, has anyone done this before?
Re: Import CSV as ordinary user
Posted: 2019-04-04 14:18
by a.gneady
We plan to make the option to allow CSV uploads as part of group permissions available in future releases. Stay tuned.
Re: Import CSV as ordinary user
Posted: 2019-04-04 17:35
by pbottcher
Hi,
I copied the pageUploadCSV.php to the root directory and replaced
Code: Select all
$currDir = dirname(__FILE__);
require("{$currDir}/incCommon.php");
by
Code: Select all
$app_dir = dirname(__FILE__);
if(!defined('PREPEND_PATH')) define('PREPEND_PATH', '');
include("$app_dir/defaultLang.php");
include("$app_dir/language.php");
include("$app_dir/language-admin.php");
include("$app_dir/lib.php");
include("$app_dir/add-on-functions.php");
at the top
Then you need to apply your user checking (which I did not need).
Hope that helps