Skip to content

Commit

Permalink
[FIX] Update ticket create form to hide contracts from other thirdpar…
Browse files Browse the repository at this point in the history
…ties for external users (#31762)

Co-authored-by: fhoedl <florian@hoedl.co>
  • Loading branch information
f-hoedl and fhoedl authored Nov 11, 2024
1 parent 56dc321 commit 75ce3e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion htdocs/core/class/html.formticket.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -769,7 +769,8 @@ function(response) {
$formcontract = new FormContract($this->db);
print '<tr><td><label for="contract"><span class="">'.$langs->trans("Contract").'</span></label></td><td>';
print img_picto('', 'contract', 'class="pictofixedwidth"');
print $formcontract->select_contract(-1, GETPOSTINT('contactid'), 'contractid', 0, 1, 1, 1);
// socid is for internal users null and not 0 or -1
print $formcontract->select_contract($user->socid ?? -1, GETPOSTINT('contactid'), 'contractid', 0, 1, 1, 1);
print '</td></tr>';
}
}
Expand Down

0 comments on commit 75ce3e8

Please sign in to comment.