Skip to content
Snippets Groups Projects
Commit bd83b9d3 authored by Francois Romain's avatar Francois Romain
Browse files

fix: droits utilisateurs pour remplir un rapport

parent a662fbb1
No related branches found
No related tags found
No related merge requests found
......@@ -22,9 +22,11 @@ const resolvers = {
const user = await utilisateurGet(context.user.id)
if (
permissionsCheck(context.user, ['entreprise']) &&
!titre.titulaires.find(t => t.id === user.entrepriseId) &&
!permissionsCheck(context.user, ['super', 'admin'])
!(
permissionsCheck(context.user, ['super', 'admin']) ||
(permissionsCheck(context.user, ['entreprise']) &&
titre.titulaires.find(t => t.id === user.entrepriseId))
)
) {
errors.push("droits insuffisants pour effectuer l'opération")
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment