Skip to content

Delete panel users with Paymenter users, skip OAuth consent for Calagopus, warn on unmatched egg variables - #5

Merged
0x7d8 merged 6 commits into
calagopus:mainfrom
elBelgg:main
Nov 11, 2026
Merged

0x7d8 merged 6 commits into
calagopus:mainfrom
elBelgg:main

Conversation

@elBelgg

@elBelgg elBelgg commented Nov 11, 2026

Copy link
Copy Markdown
Contributor
  1. Delete panel users when the Paymenter user is deleted (opt-in)
    Paymenter deletes a user's services through a DB cascade, without calling terminateServer, so the panel user and all their servers were left behind. That's a problem for hosts handling data-deletion (GDPR) requests.

New checkbox: "Delete Panel Users With Paymenter Users" (off by default). When enabled, a User::deleting listener:

Finds the panel user by external ID, falling back to the OAuth link.
Force-deletes every server they own (Calagopus refuses to delete a user who still owns servers).
Deletes the panel user.
If the panel API fails, the exception aborts the Paymenter deletion so both sides stay consistent. boot() only runs once per extension name, so the listener walks every configured Calagopus server itself.

  1. Skip the OAuth consent screen for Calagopus
    Login with Paymenter on the panel showed Passport's "authorize application" screen to every new user. Now, when a Paymenter OAuth client redirects to the host of a configured Calagopus panel, the screen is skipped and the user goes straight back to the panel. Other OAuth clients still ask for consent. No configuration needed.

This works through a client model subclass overriding skipsAuthorization(). It's registered in app()->booted() because Paymenter calls Passport::useClientModel() after extensions boot.

  1. Warn when config options don't match any egg variable
    Unmatched config options are silently ignored and the egg falls back to its defaults, which is hard to debug after renaming an egg variable. The module now logs the unmatched names together with the egg's variable names.

@0x7d8
0x7d8 merged commit fc9f69d into calagopus:main Nov 11, 2026
3 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.

2 participants