Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(auth): show reset password button only for locally authenticated users #4842

Merged
merged 1 commit into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading