fix: no assigned resources on permission group (#7761)

Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
Laurin 2026-03-03 16:35:59 +01:00 committed by GitHub
parent b91f849687
commit 14581baf69
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 8 additions and 2 deletions

View file

@ -0,0 +1,5 @@
---
'hive': patch
---
Correctly display permission group without assigned resources.

View file

@ -1468,6 +1468,7 @@ export default gql`
- **App Deployment** "the-guild/graphql-hive/production/appDeployment/production"
These ids can also contain wildcards, e.g. "the-guild/graphql-hive/*", to reference all targets in a project.
If the field resolves to 'null', the permission group is not granted on any resource.
"""
resolvedResourceIds: [String!]
"""

View file

@ -89,8 +89,8 @@ export function PermissionDetailView(props: {
))}
<div className="w-full space-y-1">
{group.resolvedResourceIds == null ? (
<p className="text-neutral-10">
Granted on all {permissionLevelToResourceName(group.level)}
<p className="text-neutral-10 text-red-500">
Not granted on any {permissionLevelToResourceName(group.level).slice(0, -1)}.
</p>
) : (
<>