1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-03-23 00:16:25 +01:00

chore: remove apitoken.username (#9448)

Removes usage of the deprecated API token property `username` and uses
`tokenName` instead.

Affected components:

Token table:

![image](https://github.com/user-attachments/assets/7275e9ae-a79c-4815-9f8d-157008480b97)


Token deletion dialog:

![image](https://github.com/user-attachments/assets/1c47cd3d-c7ff-4547-9779-eaba16274d1e)


Environment post-clone screen (which is automatically hidden now, so it
... doesn't matter)
This commit is contained in:
Thomas Heartman 2025-03-11 08:32:50 +01:00 committed by GitHub
parent 143c8a3074
commit be57f9f8fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -63,8 +63,8 @@ export const RemoveApiTokenButton = ({
<br />
<StyledUl>
<li>
<strong>username</strong>:{' '}
<code>{token.username}</code>
<strong>name</strong>:{' '}
<code>{token.tokenName}</code>
</li>
<li>
<strong>type</strong>: <code>{token.type}</code>

View File

@ -39,7 +39,7 @@ export const useApiTokenTable = (
},
{
Header: 'Token name',
accessor: 'username',
accessor: 'tokenName',
Cell: HighlightCell,
minWidth: 35,
},

View File

@ -29,7 +29,7 @@ export const EnvironmentTokenDialog = ({
Your new token has been created successfully.
</Typography>
<Typography variant='body1'>
You can also find it as "<strong>{token?.username}</strong>" in the{' '}
You can also find it as "<strong>{token?.tokenName}</strong>" in the{' '}
<Link to='/admin/api'>API access page</Link>.
</Typography>
<UserToken token={token?.secret || ''} />

View File

@ -5,7 +5,7 @@ import handleErrorResponses from '../httpErrorResponseHandler';
export interface IApiToken {
createdAt: Date;
username: string;
tokenName: string;
secret: string;
type: string;
project?: string;