Skip to content
Snippets Groups Projects
Commit 17db675c authored by Laurent Lecluse's avatar Laurent Lecluse
Browse files

Mauvais test d'utilité: les privilèges n'étaient pas migrés

parent 45f0c5d2
Branches
Tags
No related merge requests found
......@@ -16,22 +16,7 @@ class v18Privileges extends AbstractMigration
public function utile(): bool
{
if (!$this->manager->hasTable('SAVE_V18_PRIVILEGE')) {
return false;
}
$sql = "
SELECT
count(*) c
FROM
privilege p
JOIN categorie_privilege cp ON cp.id = p.categorie_id
WHERE
cp.code = 'enseignement'
AND p.code = 'visualisation'
";
return $this->manager->getBdd()->select($sql)[0]['C'] == '1';
return $this->manager->hasTable('SAVE_V18_PRIVILEGE');
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment