Skip to content

Add KHDP account unlink functionality#2569

Merged
Chrystinne merged 8 commits intodevfrom
cf/khdp-disable-account-linking
Jan 29, 2026
Merged

Add KHDP account unlink functionality#2569
Chrystinne merged 8 commits intodevfrom
cf/khdp-disable-account-linking

Conversation

@Chrystinne
Copy link
Copy Markdown
Collaborator

This PR implements the possibility to unlink a KHDP account from the user's PhysioNet profile by adding an "Unlink KHDP Account" button on the settings page.

The button is displayed conditionally when an account is already linked, mirroring the pattern used for ORCID account management.

@Chrystinne Chrystinne linked an issue Jan 29, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Member

@tompollard tompollard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Chrystinne - added some comments inline.

@Chrystinne
Copy link
Copy Markdown
Collaborator Author

Chrystinne commented Jan 29, 2026

Thanks Chrystinne - added some comments inline.

Thanks for your comments, @tompollard. I've made the changes. That actually makes it more user-friendly.

final_url = f"{khdp_auth_url}?{urlencode(params)}"
return redirect(final_url)

if request.POST.get('remove_khdp'):
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry, i should have picked this up before, but i think elif is better here. we only ever want request_khdp or remove_khdp so coupling them makes sense.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tompollard I initially did it the way you suggested, but later changed it to match the orcid implementation. No worries, I’ll make that change

Copy link
Copy Markdown
Member

@tompollard tompollard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Chrystinne, looks good!

@Chrystinne Chrystinne added this pull request to the merge queue Jan 29, 2026
Merged via the queue into dev with commit 9194980 Jan 29, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

KHDP: Add KHDP account unlink functionality

2 participants