Remove admin check from tags query in Domain model

Simplifies the tags query by removing the isAdmin check. Now, if a user ID is provided, the query filters by user_id regardless of admin status.
This commit is contained in:
Hosteroid
2025-10-20 18:21:05 +03:00
parent 22817b7127
commit 719fb86c7a

View File

@@ -305,7 +305,7 @@ class Domain extends Model
$sql = "SELECT DISTINCT tags FROM domains WHERE tags IS NOT NULL AND tags != ''";
$params = [];
if ($userId && !$this->getUserModel()->isAdmin($userId)) {
if ($userId) {
$sql .= " AND user_id = ?";
$params[] = $userId;
}