Skip to content

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

Closed
elBelgg wants to merge 5 commits into
calagopus:mainfrom
elBelgg:main
Closed

elBelgg wants to merge 5 commits into
calagopus:mainfrom
elBelgg:main

Conversation

@elBelgg

@elBelgg elBelgg commented Nov 7, 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:

  1. Finds the panel user by external ID, falling back to the OAuth link.
  2. Force-deletes every server they own (Calagopus refuses to delete a user who still owns servers).
  3. 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.

2. 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.

3. 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 commented Nov 11, 2026

Copy link
Copy Markdown
Member

@elBelgg please resolve the conflicts

elBelgg

This comment was marked as duplicate.

@elBelgg elBelgg left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

@elBelgg elBelgg closed this Nov 11, 2026
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