Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix: unprivileged user can add residence_and_rental to a applicant
  • Loading branch information
Ahmad Gneady committed Jul 3, 2021
1 parent 2c18e33 commit 5d3fa4e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions app/hooks/residence_and_rental_history.php
@@ -1,10 +1,10 @@
<?php
// For help on using hooks, please refer to http://bigprof.com/appgini/help/working-with-generated-web-database-application/hooks

function residence_and_rental_history_init(&$options, $memberInfo, &$args){
/* Inserted by Search Page Maker for AppGini on 2020-11-18 12:19:27 */
$options->FilterPage = 'hooks/residence_and_rental_history_filter.php';
/* End of Search Page Maker for AppGini code */
function residence_and_rental_history_init(&$options, $memberInfo, &$args){
/* Inserted by Search Page Maker for AppGini on 2020-11-18 12:19:27 */
$options->FilterPage = 'hooks/residence_and_rental_history_filter.php';
/* End of Search Page Maker for AppGini code */


return TRUE;
Expand Down Expand Up @@ -75,6 +75,8 @@ function residence_and_rental_history_footer($contentType, $memberInfo, &$args){
}

function residence_and_rental_history_before_insert(&$data, $memberInfo, &$args){
// can current user view this parent?
if(!check_record_permission('applicants_and_tenants', $data['tenant'])) return false;

return TRUE;
}
Expand All @@ -85,6 +87,8 @@ function residence_and_rental_history_after_insert($data, $memberInfo, &$args){
}

function residence_and_rental_history_before_update(&$data, $memberInfo, &$args){
// can current user view this parent?
if(!check_record_permission('applicants_and_tenants', $data['tenant'])) return false;

return TRUE;
}
Expand Down

0 comments on commit 5d3fa4e

Please sign in to comment.