Page 1 of 1

Customize filter in table view according to group

Posted: 2024-09-20 19:47
by lramirez
Hello friends... a question...
Where can I find or does anyone have an idea of ​​how to hide "rows" in the table view according to the user group in AppGini. I don't want to make the change through the group assignment, but rather, when changing the field word, the row is hidden or shown for the group that belongs to it.
Example:
Leader (see all)
There is a row that says A and nobody sees it... but if leader changes to B, group 1 and group 2 can see the row.
but if leader changes to C then only group 2 will see it, and group 1 will not be able to see the row.
I tried this with lesson 3 of the Course and it worked well... but I have limitations, since I don't want that group to continue seeing the button where the original filter list comes from and I hide it, the filter is not performed in the new button and it tells me that I don't have permissions. :-(

In other words, it's like I want to assign an owner or groups from admin, but I don't want a group with many privileges to become admin.

Could this be done?
I'm not a Pro programmer, just what I've learned with these valuable tools. I hope someone understands what I want to do.
THANKS

Re: Customize filter in table view according to group

Posted: 2024-09-20 19:58
by pbottcher
Hi,

you can use the _init hook to set additional parametes to the standardquest. Use the $options->QueryWhere.
Like that you could check the username ftom the $memberInfo array and populate the QueryWhere.
Aditionally you would need to check in the _dv hooks that the user does not access the record directly.

Re: Customize filter in table view according to group

Posted: 2024-09-20 20:27
by lramirez
Thanks... I'm going to try it... and also thanks for the DV topic... I already have that solved with the tool from Field Permissions https://forums.appgini.com/phpbb/viewto ... f=4&t=3308

Re: Customize filter in table view according to group

Posted: 2024-09-23 19:39
by lramirez
Good morning to all... greetings...
I, thinking crazy things and wanting to have facilities for my AppGini end users... I wonder if anyone has tried or anyone knows how I could place the link or access to "change owner" somewhere else in a DV or HTML template. ...or something similar to the simulated image I show you...


Is this possible?

Thank you for your collaboration.