feat: Add ENABLE_SOCIAL_APPS_USER_REGISTRATION settings

Summary

While testing SOCIALACCOUNT_ONLY with my WIP branch there https://gitlab.com/tytan652/glitchtip-backend/-/tree/social_apps_only_registration, I met an issue where I was unable to login with my superuser login. SOCIALACCOUNT_ONLY seems to completely block other kind of login with pre-existing account not only registration.

Adds the capability to set ENABLE_SOCIAL_APPS_USER_REGISTRATION to enable registration through social apps it defaults to ENABLE_USER_REGISTRATION and so both can be independently set to different values

It also add "enable_social_apps_user_registration" in the API settings to allow frontends to be aware of this state. Even if the social apps login button is enough to register with the actual glitchtip-frontend.

On the test side, only a test for non-"social apps" user registration with ENABLE_USER_REGISTRATION=False and ENABLE_SOCIAL_APPS_USER_REGISTRATION=True is added. I didn't find any test about social apps user registration in the repo to extend, I'm not used at all with this kind of projects so creating a base to test social apps is not a possibility for me.

Fixes #290 (closed)

Checklist

  • I am respecting Sentry's proprietary Business Source License (BSL) by implementing code in a clean room environment. I have not read any BSL Sentry code. It is OK to read MIT licensed code.
Edited by tytan652

Merge request reports

Loading