Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

Commit

Permalink
canUpdateAdminSettings -> canEditAdminSettings
Browse files Browse the repository at this point in the history
  • Loading branch information
SupaJoon committed Sep 14, 2023
1 parent 43bb8b6 commit 5b2667e
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion cypress/integration/nav_bar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ describe("Nav Bar", () => {
displayName: "Evergreen Admin",
emailAddress: "[email protected]",
permissions: {
canUpdateAdminSettings: false,
canEditAdminSettings: false,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/Header/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ export const Navbar: React.FC = () => {
>
My Hosts
</PrimaryLink>
{permissions?.canUpdateAdminSettings && (
{permissions?.canEditAdminSettings && (
<PrimaryLink data-cy="admin-link" to={adminSettingsURL}>
Admin
</PrimaryLink>
Expand Down
7 changes: 2 additions & 5 deletions src/gql/generated/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"];
};
Expand Down Expand Up @@ -8301,10 +8301,7 @@ export type UserQuery = {
displayName: string;
emailAddress: string;
userId: string;
permissions: {
__typename?: "Permissions";
canUpdateAdminSettings: boolean;
};
permissions: { __typename?: "Permissions"; canEditAdminSettings: boolean };
};
};

Expand Down
2 changes: 1 addition & 1 deletion src/gql/mocks/getUser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const getUserMock: ApolloMock<UserQuery, UserQueryVariables> = {
displayName: "Evergreen Admin",
emailAddress: "[email protected]",
permissions: {
canUpdateAdminSettings: true,
canEditAdminSettings: true,
},
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/gql/queries/get-user.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ query User {
displayName
emailAddress
permissions {
canUpdateAdminSettings
canEditAdminSettings
}
userId
}
Expand Down

0 comments on commit 5b2667e

Please sign in to comment.