Skip to content

[frontend/auth_methods] Allow auth methods to prevent user deletion - #1175

Open
anthonygego wants to merge 1 commit into
mainfrom
auth_method_removal
Open

anthonygego wants to merge 1 commit into
mainfrom
auth_method_removal

Conversation

@anthonygego

Copy link
Copy Markdown
Member

This PRs is a first step to allow both private and public usage on the same instance. It allows SAML and LDAP authentication methods (it is not relevant to social platform) to prevent the binding removal.

User deletion is then aborted if any of the bound auth methods prevents removal and invites user to contact the platform administrator.

Concretely, it is just an additional allow_removal in the auth method config.

I removed the optional argument from the UserManager.delete.user method and added typing hints but I realise there are still a lot of bad smells there that I think are out of the scope of this PR.

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 8 complexity · 4 duplication

Metric Results
Complexity 8
Duplication 4

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@nrybowski
nrybowski self-requested a review September 17, 2026 10:35

This branch has not been deployed

No deployments
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.

1 participant