From 5b2667e2aa11a83a5050754b9e1905bbcbd5d968 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Thu, 14 Sep 2023 11:19:58 -0400 Subject: [PATCH] canUpdateAdminSettings -> canEditAdminSettings --- cypress/integration/nav_bar.ts | 2 +- src/components/Header/Navbar.tsx | 2 +- src/gql/generated/types.ts | 7 ++----- src/gql/mocks/getUser.ts | 2 +- src/gql/queries/get-user.graphql | 2 +- 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/cypress/integration/nav_bar.ts b/cypress/integration/nav_bar.ts index b8c09a3956..38fbede36d 100644 --- a/cypress/integration/nav_bar.ts +++ b/cypress/integration/nav_bar.ts @@ -114,7 +114,7 @@ describe("Nav Bar", () => { displayName: "Evergreen Admin", emailAddress: "admin@evergreen.com", permissions: { - canUpdateAdminSettings: false, + canEditAdminSettings: false, }, }, }, diff --git a/src/components/Header/Navbar.tsx b/src/components/Header/Navbar.tsx index a4fac747a6..8a4949e96a 100644 --- a/src/components/Header/Navbar.tsx +++ b/src/components/Header/Navbar.tsx @@ -82,7 +82,7 @@ export const Navbar: React.FC = () => { > My Hosts - {permissions?.canUpdateAdminSettings && ( + {permissions?.canEditAdminSettings && ( Admin diff --git a/src/gql/generated/types.ts b/src/gql/generated/types.ts index 64f0de0677..414d76e819 100644 --- a/src/gql/generated/types.ts +++ b/src/gql/generated/types.ts @@ -1518,7 +1518,7 @@ export type Permissions = { __typename?: "Permissions"; canCreateDistro: Scalars["Boolean"]["output"]; canCreateProject: Scalars["Boolean"]["output"]; - canUpdateAdminSettings: Scalars["Boolean"]["output"]; + canEditAdminSettings: Scalars["Boolean"]["output"]; distroPermissions: DistroPermissions; userId: Scalars["String"]["output"]; }; @@ -8301,10 +8301,7 @@ export type UserQuery = { displayName: string; emailAddress: string; userId: string; - permissions: { - __typename?: "Permissions"; - canUpdateAdminSettings: boolean; - }; + permissions: { __typename?: "Permissions"; canEditAdminSettings: boolean }; }; }; diff --git a/src/gql/mocks/getUser.ts b/src/gql/mocks/getUser.ts index 2f130fb24b..9f4d3042e2 100644 --- a/src/gql/mocks/getUser.ts +++ b/src/gql/mocks/getUser.ts @@ -15,7 +15,7 @@ export const getUserMock: ApolloMock = { displayName: "Evergreen Admin", emailAddress: "admin@evergreen.com", permissions: { - canUpdateAdminSettings: true, + canEditAdminSettings: true, }, }, }, diff --git a/src/gql/queries/get-user.graphql b/src/gql/queries/get-user.graphql index 106d7e0290..33d97d438b 100644 --- a/src/gql/queries/get-user.graphql +++ b/src/gql/queries/get-user.graphql @@ -3,7 +3,7 @@ query User { displayName emailAddress permissions { - canUpdateAdminSettings + canEditAdminSettings } userId }