Hi everyone.
I need help solving this problem:
I would like to allow a group NOT authorized to see the "participants" table to see the records of the "participants" table when these records are displayed as childs records in the detailed view of the "activity" table.
Any suggestion?
Thanks!
Fabiano
See the records in a table when they are represented as child records even if you are not authorized to see that table
Re: See the records in a table when they are represented as child records even if you are not authorized to see that tab
Hi Fabiano,
in AppGini standard I don't see any bullet-proof solution using project settings and hooks only, but you may try the following which may give you >90% of the expected result:
I admit, if users know the URL and navigate to participants_view.php they will be able to see the records in table view.
Workaround
You can modify SQL-query in participants_init() function. Try adding an negative condition to the SQL-"WHERE" clause" like "1=0" for example. No records should be returned and displayed with this WHERE-clause.
I have roughly tested it, but not in all variations. Can this be a workaround for you?
Kind Regards,
Jan
in AppGini standard I don't see any bullet-proof solution using project settings and hooks only, but you may try the following which may give you >90% of the expected result:
- Allow the group to view the records using group-permissions in admin-area
- In your appGini project, [X] Hide link in homepage
- and [X] Hide link in navigation menu
- and uncheck [ ] participants in Detail view settings / "Display a link to children records from" field
- In Parent/Children settings set "participants" [X] Enabled
- ...allow the group members to see the records in children tabs of "Activity" details view
- ...remove the "Participants" button at the top of the "Activity" details view
- ...hide "Participants" table from the home / dashboard
- ...hide "Participants" from the dropdown menu
I admit, if users know the URL and navigate to participants_view.php they will be able to see the records in table view.
Workaround
You can modify SQL-query in participants_init() function. Try adding an negative condition to the SQL-"WHERE" clause" like "1=0" for example. No records should be returned and displayed with this WHERE-clause.
Code: Select all
function participants_init(&$options, $memberInfo, &$args)
{
$options->QueryWhere = "1=0";
return TRUE;
}
Kind 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
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<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 readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: See the records in a table when they are represented as child records even if you are not authorized to see that tab
Hi Pascal and thanks for your reply.
Unfortunately your sfirst suggestion would make that no group can see the table on the home page while I would like other groups to see the table.
Moreover, with the second suggestion, if I have not misunderstood it, the records would remain invisible but not the table which would appear, even if empty.
I hope there are new ideas and new suggestions.
Thank you!
Fabiano
Unfortunately your sfirst suggestion would make that no group can see the table on the home page while I would like other groups to see the table.
Moreover, with the second suggestion, if I have not misunderstood it, the records would remain invisible but not the table which would appear, even if empty.
I hope there are new ideas and new suggestions.
Thank you!
Fabiano
Re: See the records in a table when they are represented as child records even if you are not authorized to see that tab
Hi Fabiano,
you are right, except that I'm not Pascal
Best,
Jan
you are right, except that I'm not Pascal
Best,
Jan
Kind regards,
<js />
My AppGini Blog:
https://appgini.bizzworxx.de/blog
You can help us helping you:
Please always put code fragments inside
AppGini 24.10 Revision 1579 + all AppGini Helper tools
<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 readabilityAppGini 24.10 Revision 1579 + all AppGini Helper tools
Re: See the records in a table when they are represented as child records even if you are not authorized to see that tab
Hi Fabiano,
you can try this:
This will show to the group an empty page.
As alternativ you could redirect the users of that group via
you can try this:
Code: Select all
function participants_init(&$options, $memberInfo, &$args)
{
if ($memberInfo['group'] == "YOURGROUPTHATSHOULDNOTSEETHERECORDS") {
return FALSE;
}
return TRUE;
}
As alternativ you could redirect the users of that group via
Code: Select all
function participants_init(&$options, $memberInfo, &$args)
{
if ($memberInfo['group'] == "YOURGROUPTHATSHOULDNOTSEETHERECORDS") {
redirect($URL);
exit;
}
return TRUE;
}
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.