NO DELETE OF FIELDS OR TABLES ON SET UP

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
User avatar
toconnell
Veteran Member
Posts: 204
Joined: 2013-04-09 19:29
Location: Oklahoma City, OK
Contact:

NO DELETE OF FIELDS OR TABLES ON SET UP

Post by toconnell » 2013-11-21 17:36

I have a database I use ever day.. I want make it kinda dummy proof for some users.. the one table Bus_status has 23 fields. Some folks only need to use 4 of those fields to do thier work. I would like to build an interface that only allows them access to the 4 fields. Basically a limited version of my original database without hurting my original. This allows the dummys to only access the fields they need to touch. A new apx file for the same mysql database as the original. Basically to use as new views only.

I tinkered trying to create new views.. no luck.
I then thought.. the database is actually MYSQL and appgini application is just an interface to that. So I will keep my original interface I built called ASDATA and build a new one for the dummys called Ops Toolbox. I did.. and deleted all the fields I don't want the 'dummy's' to access.

It would be great except the set up part.. when I ran the set up it deleted all the tables and fields I deleted in the dummy application called Ops Toolbox. I don't want it to do that. I want it to do everything else to set up with the EXCEPTION of deleting fields or tables that are existing in mysql but not in the dummy axp file. I would like to do this without the set up file deleting anything.. leave all the other tables and fields alone and just set up this interface to only access these few fields in this new apx file. The required fields including the record ID numbers are in every table on the dummy app as well as the original app.

How can I do this Ahmad? HELP Pretty please.

Thanks, Tina
Thanks, Tina
Tina O'Connell
Web Dev & Appgini FAN

User avatar
toconnell
Veteran Member
Posts: 204
Joined: 2013-04-09 19:29
Location: Oklahoma City, OK
Contact:

Re: NO DELETE OF FIELDS OR TABLES ON SET UP

Post by toconnell » 2013-11-21 17:55

I found this in the setup.php file on line 135.

/* create database tables */
$silent = false;
include("$curr_dir/updateDB.php");


If I delete this before I upload the file to my server.. will that prevent it from updating the mysql tables but allow it to do everything else?

Thanks, Tina
Tina O'Connell
Web Dev & Appgini FAN

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

Re: NO DELETE OF FIELDS OR TABLES ON SET UP

Post by a.gneady » 2014-02-04 08:17

I'm so sorry for the long delay. In case you're still experiencing this issue or someone stumbles upon this thread (I replied to Tina's question on a support request I received) .. the most effective way of preventing your AppGini application from making any modifications to the structure of the database is to create a MySQL user with limited privileges (no create, alter or drop) and use it during the setup of your AppGini application rather than use a MySQL user that has full permissions.

More info about MySQL users and privileges: http://dev.mysql.com/doc/refman/5.5/en/ ... ystem.html
: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.

User avatar
toconnell
Veteran Member
Posts: 204
Joined: 2013-04-09 19:29
Location: Oklahoma City, OK
Contact:

Re: NO DELETE OF FIELDS OR TABLES ON SET UP

Post by toconnell » 2014-02-05 19:03

I think there is some miscommunication.. I want them to see and edit and even delete records but I only want to limit them on the actual fields they see..

For example..

Erica does our hire process but she is not an HR director.. I don't want her to have access to employee SS#'s and until they are actually hired she does not need that information.

I only want Erica to get the name, address, phone numbers and emails and notes on her pre-screening into the database..

All the other compliance requirements and employee details are done by HR.

Therefore I want to restrict erica to only 7 of the 46 fields on the employee compliance table..


Another example..
I have 2 field operational managers who need to change drivers and buses assigned to a route number on the road from their phone. I would like them to see on their phone only the fields RouteNumber, BusUnit and AM_Driver_Assigned and PM_Driver_Assigned only and of course the save changes green button.. that is all they need. There are actually 17 fields on that page but they don't need them on the road.

I was actually able to pull this off by saving a copy of the dml file and just deleting the fields out.. and it worked.. The only trick is you could NOT delete any REQUIRED fields or auto filled fields.

Thanks though, Tina
Tina O'Connell
Web Dev & Appgini FAN

benzoD
Veteran Member
Posts: 69
Joined: 2013-01-31 21:16

Re: NO DELETE OF FIELDS OR TABLES ON SET UP

Post by benzoD » 2014-02-14 16:09

He is saying that when installing the generated app, use a MySQL user with limited privileges, so the script cannot delete tables.

User avatar
toconnell
Veteran Member
Posts: 204
Joined: 2013-04-09 19:29
Location: Oklahoma City, OK
Contact:

Re: NO DELETE OF FIELDS OR TABLES ON SET UP

Post by toconnell » 2014-02-21 20:27

why, i can control that through the user privledges and it works.. and is tested..

Thanks, Tina
Tina O'Connell
Web Dev & Appgini FAN

Post Reply