diff --git a/module/CLI/src/Command/Api/ListKeysCommand.php b/module/CLI/src/Command/Api/ListKeysCommand.php index 17054f95..cf09e614 100644 --- a/module/CLI/src/Command/Api/ListKeysCommand.php +++ b/module/CLI/src/Command/Api/ListKeysCommand.php @@ -62,7 +62,7 @@ class ListKeysCommand extends Command $rowData[] = sprintf($messagePattern, $this->getEnabledSymbol($apiKey)); } $rowData[] = $expiration !== null ? $expiration->toAtomString() : '-'; - $rowData[] = $apiKey->isAdmin() ? '-' : implode("\n", $apiKey->mapRoles( + $rowData[] = $apiKey->isAdmin() ? 'Admin' : implode("\n", $apiKey->mapRoles( fn (string $roleName, array $meta) => empty($meta) ? Role::toFriendlyName($roleName) diff --git a/module/CLI/test/Command/Api/ListKeysCommandTest.php b/module/CLI/test/Command/Api/ListKeysCommandTest.php index 2912d110..116f979d 100644 --- a/module/CLI/test/Command/Api/ListKeysCommandTest.php +++ b/module/CLI/test/Command/Api/ListKeysCommandTest.php @@ -55,9 +55,9 @@ class ListKeysCommandTest extends TestCase +-----+------------+-----------------+-------+ | Key | Is enabled | Expiration date | Roles | +-----+------------+-----------------+-------+ - | foo | +++ | - | - | - | bar | +++ | - | - | - | baz | +++ | - | - | + | foo | +++ | - | Admin | + | bar | +++ | - | Admin | + | baz | +++ | - | Admin | +-----+------------+-----------------+-------+ OUTPUT, @@ -69,8 +69,8 @@ class ListKeysCommandTest extends TestCase +-----+-----------------+-------+ | Key | Expiration date | Roles | +-----+-----------------+-------+ - | foo | - | - | - | bar | - | - | + | foo | - | Admin | + | bar | - | Admin | +-----+-----------------+-------+ OUTPUT, @@ -92,13 +92,13 @@ class ListKeysCommandTest extends TestCase +------+-----------------+--------------------------+ | Key | Expiration date | Roles | +------+-----------------+--------------------------+ - | foo | - | - | + | foo | - | Admin | | bar | - | Author only | | baz | - | Domain only: example.com | - | foo2 | - | - | + | foo2 | - | Admin | | baz2 | - | Author only | | | | Domain only: example.com | - | foo3 | - | - | + | foo3 | - | Admin | +------+-----------------+--------------------------+ OUTPUT,