Need help on data level security

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
user8409
Posts: 3
Joined: 2016-02-17 11:13

Need help on data level security

Post by user8409 » 2016-02-22 08:03

Hi,

I have a situation where admin will be loading all the users into application for ex: students data.
How to assign individual students to their own record. I do not see any option to do this in Admin area.

Another situation:

I've a product Category table populating through my application, where as Product price list I'm loading through insert command at // hook: Product_Price_list_after_insert.

How to assign owner to the records in Product Price List.

appreciate your help in advance
Thanks,

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

Re: Need help on data level security

Post by a.gneady » 2016-02-23 04:47

To assign and owner to multiple records, please see this thread: http://forums.appgini.com/phpbb/viewtop ... f=4&t=1976

To programmatically assign owner of a record that you inserted through hooks into a table that we'll name "sales_items" for example:

Code: Select all

$last_id = makeSafe(db_insert_id());
$user = makeSafe($_SESSSION['memberID']);
$group = sqlValue("select groupID from membership_users where memberID='$user'");
$ts = time();
sql("insert into membership_userrecords set tableName='sales_items', pkValue='$last_id', memberID='$user', dateAdded='$ts', groupID='$group'", $eo);
:idea: AppGini plugins to add more power to your apps:

Post Reply