Customize filter in table view according to group

Discussions related to customizing hooks. Hooks are documented at http://bigprof.com/appgini/help/advanced-topics/hooks/
Post Reply
User avatar
lramirez
Veteran Member
Posts: 68
Joined: 2019-11-01 23:23

Customize filter in table view according to group

Post by lramirez » 2024-09-20 19:47

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
Attachments
permisos.png
permisos.png (7.66 KiB) Viewed 259 times
b.png
b.png (3.23 KiB) Viewed 259 times
c.png
c.png (6.6 KiB) Viewed 259 times
Luis Ramirez R.

pbottcher
AppGini Super Hero
AppGini Super Hero
Posts: 1667
Joined: 2018-04-01 10:12

Re: Customize filter in table view according to group

Post by pbottcher » 2024-09-20 19:58

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.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.

User avatar
lramirez
Veteran Member
Posts: 68
Joined: 2019-11-01 23:23

Re: Customize filter in table view according to group

Post by lramirez » 2024-09-20 20:27

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
Luis Ramirez R.

User avatar
lramirez
Veteran Member
Posts: 68
Joined: 2019-11-01 23:23

Re: Customize filter in table view according to group

Post by lramirez » 2024-09-23 19:39

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.
Attachments
owen.png
owen.png (23.15 KiB) Viewed 200 times
owen2.png
owen2.png (27.31 KiB) Viewed 200 times
Luis Ramirez R.

Post Reply