Service accounts: Apply None role by default for creating SA (#75949)

* none role by default

* tests
This commit is contained in:
Eric Leijonmarck
2023-10-04 13:37:27 +01:00
committed by GitHub
parent e7c1e5e4c9
commit 6274e5b45e
2 changed files with 2 additions and 2 deletions
@@ -83,7 +83,7 @@ describe('ServiceAccountCreatePage tests', () => {
await waitFor(() =>
expect(postMock).toHaveBeenCalledWith('/api/serviceaccounts/', {
name: 'Data source scavenger',
role: 'Viewer',
role: 'None',
})
);
});
@@ -29,7 +29,7 @@ export const ServiceAccountCreatePage = ({}: Props): JSX.Element => {
const [serviceAccount, setServiceAccount] = useState<ServiceAccountDTO>({
id: 0,
orgId: contextSrv.user.orgId,
role: OrgRole.Viewer,
role: OrgRole.None,
tokens: 0,
name: '',
login: '',