Import CSV as ordinary user

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
bescott53

Import CSV as ordinary user

Post by bescott53 » 2019-03-22 12:39

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?

User avatar
a.gneady
Site Admin
Posts: 1281
Joined: 2012-09-27 14:46
Contact:

Re: Import CSV as ordinary user

Post by a.gneady » 2019-04-04 14:18

We plan to make the option to allow CSV uploads as part of group permissions available in future releases. Stay tuned.
:idea: AppGini plugins to add more power to your apps:
  • DataTalk is an innovative AppGini plugin based on ChatGPT that allows you to interact with your AppGini database using natural language questions, without writing any SQL. Check the demo video
  • Mass Update plugin: Update multiple records at once and improve your workflow efficiency.
  • Check our other plugins and get a generous discount of up to 30% when buying 2 or more plugins.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1635
Joined: 2018-04-01 10:12

Re: Import CSV as ordinary user

Post by pbottcher » 2019-04-04 17:35

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
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

Post Reply