FIX user without permission can set ticket subject

This commit is contained in:
Laurent Destailleur 2021-09-19 00:56:10 +02:00
parent 052511d081
commit facd6abec3

View File

@ -492,7 +492,7 @@ if (empty($reshook)) {
}
}
if ($action == 'setsubject') {
if ($action == 'setsubject' && $user->rights->ticket->write) {
if ($object->fetch(GETPOST('id', 'int'))) {
if ($action == 'setsubject') {
$object->subject = GETPOST('subject', 'alphanohtml');