mirror of
https://github.com/shlinkio/shlink.git
synced 2025-02-25 18:45:27 -06:00
Add ORPHAN_VISITS_EXCLUDED API key role
This commit is contained in:
@@ -79,6 +79,7 @@ class DomainRepository extends EntitySpecificationRepository implements DomainRe
|
||||
yield from $apiKey?->mapRoles(fn (Role $role, array $meta) => match ($role) {
|
||||
Role::DOMAIN_SPECIFIC => ['d', new IsDomain(Role::domainIdFromMeta($meta))],
|
||||
Role::AUTHORED_SHORT_URLS => ['s', new BelongsToApiKey($apiKey)],
|
||||
default => null,
|
||||
}) ?? [];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -56,6 +56,7 @@ class TagRepository extends EntitySpecificationRepository implements TagReposito
|
||||
Role::AUTHORED_SHORT_URLS => $qb->andWhere(
|
||||
$qb->expr()->eq('s.author_api_key_id', $conn->quote($apiKey->getId())),
|
||||
),
|
||||
default => $qb,
|
||||
});
|
||||
|
||||
// For admins and when no API key is present, we'll return tags which are not linked to any short URL
|
||||
|
||||
Reference in New Issue
Block a user