From 6274e5b45ec1d79b277192e7ba94776bcad678b4 Mon Sep 17 00:00:00 2001 From: Eric Leijonmarck Date: Wed, 4 Oct 2023 13:37:27 +0100 Subject: [PATCH] Service accounts: Apply None role by default for creating SA (#75949) * none role by default * tests --- .../features/serviceaccounts/ServiceAccountCreatePage.test.tsx | 2 +- .../app/features/serviceaccounts/ServiceAccountCreatePage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/public/app/features/serviceaccounts/ServiceAccountCreatePage.test.tsx b/public/app/features/serviceaccounts/ServiceAccountCreatePage.test.tsx index 7d53a87ffa2..ccb200df8f4 100644 --- a/public/app/features/serviceaccounts/ServiceAccountCreatePage.test.tsx +++ b/public/app/features/serviceaccounts/ServiceAccountCreatePage.test.tsx @@ -83,7 +83,7 @@ describe('ServiceAccountCreatePage tests', () => { await waitFor(() => expect(postMock).toHaveBeenCalledWith('/api/serviceaccounts/', { name: 'Data source scavenger', - role: 'Viewer', + role: 'None', }) ); }); diff --git a/public/app/features/serviceaccounts/ServiceAccountCreatePage.tsx b/public/app/features/serviceaccounts/ServiceAccountCreatePage.tsx index 45e612ea85b..70425722dca 100644 --- a/public/app/features/serviceaccounts/ServiceAccountCreatePage.tsx +++ b/public/app/features/serviceaccounts/ServiceAccountCreatePage.tsx @@ -29,7 +29,7 @@ export const ServiceAccountCreatePage = ({}: Props): JSX.Element => { const [serviceAccount, setServiceAccount] = useState({ id: 0, orgId: contextSrv.user.orgId, - role: OrgRole.Viewer, + role: OrgRole.None, tokens: 0, name: '', login: '',