Custom pages to nav doesn't work when users don't have permissions for all table_groups

If you're a new user of AppGini, feel free to ask general usage questions, or look for answers here.
Post Reply
graham
Veteran Member
Posts: 61
Joined: 2020-09-29 12:30

Custom pages to nav doesn't work when users don't have permissions for all table_groups

Post by graham » 2020-10-30 18:20

I've added some custom pages as per - https://bigprof.com/appgini/help/advanc ... cess-pages - and applied the table_group as per - https://bigprof.com/appgini/help/advanc ... r-contents -. "table_group' is the index of table group, default is 0 (first table group)" so I have a table_group called 'Other' which is my sixth table group. Therefore I've said ''table_group' => 5,'. The problem is this works if a user has permission to view all six table_groups. I have Users who can only view 5 of the six table_groups and this means that my custom pages do not get appended to the 'Others' dropdown - they end up in an extraneous 'ghost' drop down with no name that appears after the 'Other's drop down because they don't have permission to see table_group 3, table_group 5 doesn't actually exist for them? (Does that make sense?) So my first thought is, instead of 'table_group' => 5,' in links-navmenu.php, the better way would seem to be to say - table_group' => 'Other' - in other words, reference the table_group name rather than a number. So I've spent an good while trying to figure out how to do that and can't. Can anybody help with how to do that - or an alternative solution? If so thanks very much. (Summary - recommended way of adding custom pages to normal nav links doesn't work for all users.)

graham
Veteran Member
Posts: 61
Joined: 2020-09-29 12:30

Re: Custom pages to nav doesn't work when users don't have permissions for all table_groups

Post by graham » 2020-11-02 16:32

I appear to have found a work round so I'm posting it here in case it helps anyone else..
I created an extra table and allocated it to the table_group that wasn't appearing for some users (because they didn't have any permissions). And I ticked 'hide in nav bar' for the new table. Then in the Groups permission tables in my apps admin panel, I marked it as 'view all' (no to everything else).
Now, (a) anyone who can see all tables sees my custom files in the correct drop-down and (b) doesn't see the 'ghost' table in the drop down for the table_group I allocated it to and (b) anyone who can't see all tables still sees custom files in correct place.

The only loose end with my solution (as far as I can see for now), is that I quite explain confidently why it works. Any clarification welcome.

Post Reply