Same table with different view? / Filtered view

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
Panadu
Posts: 7
Joined: 2016-02-08 19:10

Same table with different view? / Filtered view

Post by Panadu » 2018-11-02 11:45

Hello,

i have a problem. We have several consultants which have all their own customers. All customer are in one table but the office make the entries and so the owner and grop of the entries is the office.

Now we want to give the consultants access to the customer table, but they should see only their own customers.

I had the idea that we can make a second view of the table with a filter by consultant. But if i tried this with a saved filter the consultant cannot see the entries, because he has no rights for the office group.
If i give the consultants right for all or office entries, they can change the filter-url and can see all. One Consultant made this and got some trouble.

What i need is a View where the consultant can only see his customers. And i need the possebility to set group permissions to each view.

Is that possibel???

Thank you
Panadu

User avatar
jsetzer
AppGini Super Hero
AppGini Super Hero
Posts: 1807
Joined: 2018-07-06 06:03
Location: Kiel, Germany
Contact:

Re: Same table with different view? / Filtered view

Post by jsetzer » 2018-11-02 18:52

What about changing the owner of the customer record to the responsible consultant after the Office has saved the customer record. This can be done using SQL in PHP in after-... function.

Then the consultant owns the customer record and dependant records like projects for example will inherit ownership from customer if modeled properly.

Just as a starting point.
Regards,
Jan
Kind regards,
<js />

My AppGini Blog:
https://appgini.bizzworxx.de/blog

You can help us helping you:
Please always put code fragments inside [code]...[/code] blocks for better readability

AppGini 24.10 Revision 1579 + all AppGini Helper tools

Post Reply