Skip to content
Snippets Groups Projects
Commit 482c5786 authored by Hamza HRAMCHI's avatar Hamza HRAMCHI
Browse files

Merge branch 'fix/27518/2301.0.x' into '2301.0.x'

[27518] Document out of perimeter pour le signataire du circuit

See merge request maarch/MaarchParapheur!268
parents d06dbabb 8d5eed53
No related branches found
No related tags found
No related merge requests found
......@@ -457,6 +457,9 @@ class DocumentController
}
}
/**
* @throws Exception
*/
public function create(Request $request, Response $response)
{
if (!PrivilegeController::hasPrivilege(['userId' => $GLOBALS['id'], 'privilege' => 'indexation'])) {
......@@ -1465,11 +1468,11 @@ class DocumentController
SELECT (SELECT ?::int) UNION (SELECT id FROM users WHERE substitute = ?)
)
AND "order" = (
SELECT min(ws2."order") FROM workflows ws2 WHERE ws2.process_date IS NULL AND ws2.main_document_id = main_document_id
SELECT min(ws2."order") FROM workflows ws2 WHERE ws2.process_date IS NULL AND ws2.main_document_id = ?
)
))'
],
'data' => [$args['id'], $args['userId'], $args['userId'], $args['userId']]
'data' => [$args['id'], $args['userId'], $args['userId'], $args['userId'], $args['id']]
]);
return !empty($canReadOnly);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment