Skip to content

Commit

Permalink
don't display password reset for oauth users (#4842)
Browse files Browse the repository at this point in the history
  • Loading branch information
axiomofjoy authored Oct 2, 2024
1 parent 9352c0e commit 1016fff
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 18 deletions.
1 change: 1 addition & 0 deletions app/src/contexts/ViewerContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export function ViewerProvider({
role {
name
}
authMethod
...APIKeysTableFragment
}
}
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 11 additions & 2 deletions app/src/contexts/__generated__/ViewerContext_viewer.graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 11 additions & 9 deletions app/src/pages/profile/ViewerProfileCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,17 @@ export function ViewerProfileCard() {
variant="compact"
bodyStyle={{ padding: 0 }}
extra={
<Button
variant="default"
size="compact"
onClick={() => {
navigate("/reset-password");
}}
>
Reset Password
</Button>
viewer.authMethod === "LOCAL" && (
<Button
variant="default"
size="compact"
onClick={() => {
navigate("/reset-password");
}}
>
Reset Password
</Button>
)
}
>
<View paddingTop="size-200" paddingStart="size-200" paddingEnd="size-200">
Expand Down

0 comments on commit 1016fff

Please sign in to comment.