Members

Got something cool to share with AppGini users? Feel free to post it here!
Post Reply
gatenet
Veteran Member
Posts: 45
Joined: 2016-07-26 09:34
Location: Greece
Contact:

Members

Post by gatenet » 2016-07-26 09:43

Hi everybody, i am newby in appgini and i need help, i have created an app for insurance offices and every office has a number of parthners (insurance brokers) so there is a table with customers with a field assigned to parthners (lookup field form table parthners) and a table with contracts with the same situation, a lookup field from table parthner. i want to ask if there is a way when the admin chooses one parthner in the table clients and in the table contracts, that record can go to the parthner account of membershirs? I want every parthner to see only their clients and contracts, and only the admin to see all. Can anyone help me?
Thank you

lawrencekeru
Posts: 29
Joined: 2016-06-24 02:51

Re: Members

Post by lawrencekeru » 2016-07-28 07:03

Have you checked where you assign table permissions for groups?

Admin Area => Groups => Table Permissions for group.

gatenet
Veteran Member
Posts: 45
Joined: 2016-07-26 09:34
Location: Greece
Contact:

Re: Members

Post by gatenet » 2016-08-02 06:01

Thank you for your answer lawrencereku, i know the function of groups in appgini but consider, what if two people are at the same group, i dont want the one to see the others records even if they are in the same group.

grimblefritz
AppGini Super Hero
AppGini Super Hero
Posts: 336
Joined: 2015-12-23 16:52

Re: Members

Post by grimblefritz » 2016-08-02 13:53

gatenet, have another look at the permissions. You can assign view/edit/delete access of none/owner/group/all.

If you want your admin to assign record owners, and then have only the owner view/edit/delete, then you would set the table permissions to owner. If you wanted every office to see only their records, then you'd use the group permissions and create a group for each office.

Also, note that users inherit permissions from the group they belong to. You can override this and set special user permissions. You'll see this option once you've assigned a group to a member. There will appear a "Set special permissions for this user" button below the group selector. This means you could have some users with access to everything in the group, and others with more restrictive options. Or vice versa.

You can use the admin utility, members -> view member records, to change the group and owner of individual records. Literally, one at a time, so I hope the number of records is relatively small.

Now, if you want to get fancy...

When you say admin, I assume you mean an assistant in the office, not the system administrator. I doubt you want to give an assistant full sysadmin access.

To handle this, I'd create a group for each office. I'd setup the permissions to restrict view/edit/delete to owners. This is what the partners should have, and as new users are added this is the permissions they will be given.

Then, for the assistants who need to see everything, I'd setup their special permissions accordingly - that is, full view/edit/delete access for their group. As new assistants are added, they will have to be given these special permissions.

(Or, you could swap that. Group permissions as required for assistants, then special permissions to restrict partners. Depends on the actual workflow - how many of each type, how often they come and go - as to which is better.)

What you don't have is a way for the assistants to assign record ownership - that's only done by system admin in normal AppGini. The assistants enter the contracts, so they will have the initial ownership. The group will be correct, but not the owner. You need a tool to change the ownership.

To handle that, I imagine you could write a hook - for post insert/update - to change the record(s) ownership to the selected partner in the newly added/edited record. Now, when an assistant adds/edits a record, it is instantly given the correct partner ownership. I'm confident it's possible to do this, but I don't know how it would be done. You might find someone lurking here who can help with that, though.

gatenet
Veteran Member
Posts: 45
Joined: 2016-07-26 09:34
Location: Greece
Contact:

Re: Members

Post by gatenet » 2016-08-09 17:19

THANK YOU VERY MUCH

Post Reply