Page 1 of 1

How do I finegrain Permissions regarding Ownership?

Posted: 2015-06-05 16:09
by Diogenes
Everything I have read on Membership and Ownership is still missing an important instruction or explanation for First time Users like myself.

When I create a Group such as "Office" or "Trainer" and Members are Assigned as Office Group Members I see no way to get finer control of Permissions in AppGini.

In my pre-existing projects which I am trying to duplicate in AppGini the system that worked quite well was to have a Master Users table.
  • The Primary Key numeric value of the Users table contained in a column called "trainerid", or "ownerid" is the Master reference value and field name in common in all tables used to mark a record as "belonging" to trainer 39,27,56.. etc.

    In those pre-existing projects the program I used asked me to specify which table would be used as the USERS table to refer to for logins and permissions and it asked for me to choose the Field that contained the value to be associated with Users on login.
  • Trainer Sam Carpenter's trainerid value is 36.
    The project Admin has 14 business records that she wants to assign to Sam.
    She updates all of those Parent table records by putting 39 into the trainerid column field of those 14 records in the business_info table.

    When the Admin assigns trainers to the Trainers Group with set permissions about each table she marks each table as being dependent on "Ownership"
    Trainer Sam Carpenter logs in and gets the tables and permissions that the Admin specified when she added the Trainers Group

    IN MY PROJECTS (built before I bought AppGini) at this point each trainer will only see the specific records in each table that have that trainer's trainerid value in the trainerid column. That is OWNERSHIP.

    In those projects built with another program
    When Trainers create new records in Detail Tables borrowing information from the Parent business info table the new records are marked with the trainerid value as the logged in Trainer who is generating or modifying Child/Detail records.
AppGini docs, as far as I can tell, including comments in the Forums, does not take Ownership any farther in being able to define and filter out specific records in a table so that a logged in Trainer will see every record unless he or she Generated the record in the first place.

If this Is the case I am faced with a big problem because I must come up with a coding workaround.
If there is no way with existing AppGini functions to pre-assign specific records to each trainer in every table then it disqualifies AppGini from use in my cases.

I know specific mods then would have to be added to hooks with hard coded lookups since there is no Admin panel function to build or modify user permissions to this extent.

If my assumption now is correct do you have suggestions about adding coding to the hooks available at login to help achieve this function?

Thank you, thank you.

:ugeek:

Re: How do I finegrain Permissions regarding Ownership?

Posted: 2015-06-06 12:13
by Diogenes
I know that I can fix this issue for myself by making some code changes in the generated files.

Can someone tell me the priority files which are used to examine a User's permissions before a Table or View is allowed access in their logged in account session?

I need to add a table lookup for the primary id of each user in my User's Parent table that checks for the same value in each record where that User's group already has broader permissions assigned as another condition for granting a User table access.

I am hoping it is only a few files that define global user's sessions.

Thank you for any help.

Re: How do I finegrain Permissions regarding Ownership?

Posted: 2015-06-08 03:21
by a.gneady
If I understand correctly, you want to select specific records in a table and assign their ownership to a specific user. If so, you can do this easily in your AppGini app: you should first sign in as administrator. Go to the concerned table, then find the records you want to re-assign. Check the box to the left of each record, then click the "More" button above the table .. this would display a menu .. select "Change owner" from it ... you'll be prompted to select the new owner, and click OK.

Re: How do I finegrain Permissions regarding Ownership?

Posted: 2015-06-08 21:08
by Diogenes
I am going to try this! Thanks so much!