mirror of
https://github.com/shlinkio/shlink.git
synced 2025-03-14 04:00:57 +03:00
Displayed 'Admin' as default role in API keys list
This commit is contained in:
parent
fca19f265b
commit
1c75519f9b
2 changed files with 9 additions and 9 deletions
|
@ -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)
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue