Skip to content

Commit

Permalink
Update Catalog.php
Browse files Browse the repository at this point in the history
should probably check that the catalog is enabled....
  • Loading branch information
lachlan-00 committed Jan 19, 2023
1 parent 0c51731 commit 442cd6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Repository/Model/Catalog.php
Expand Up @@ -1220,7 +1220,7 @@ public static function has_access($catalog_id, $user_id)
return true;
}
$params = array($catalog_id, $user_id);
$sql = "SELECT `catalog_id` FROM `catalog_filter_group_map` WHERE `catalog_id` = ? AND `group_id` IN (SELECT `catalog_filter_group` FROM `user` WHERE `id` = ?);";
$sql = "SELECT `catalog_id` FROM `catalog_filter_group_map` WHERE `catalog_id` = ? AND `enabled` = 1 AND `group_id` IN (SELECT `catalog_filter_group` FROM `user` WHERE `id` = ?);";

$db_results = Dba::read($sql, $params);
if (Dba::num_rows($db_results)) {
Expand Down

0 comments on commit 442cd6b

Please sign in to comment.