bito-code-review[bot] commented on PR #44368:
URL: https://github.com/apache/superset/pull/44368#issuecomment-5721244219
<!-- Bito Reply -->
The inclusion of `AUTH_OAUTH` in the registration guard is deliberate. The
PR addresses the issue where the self-registration page (`/register/`) was
exposed for auth types that do not support self-registration (like LDAP, SAML,
and `AUTH_REMOTE_USER`), even when `AUTH_USER_REGISTRATION` was enabled for
first-login provisioning.
By restricting the registration view to `AUTH_DB` and `AUTH_OAUTH` (as seen
in `superset/security/manager.py`), the change ensures that the registration
page is only served when the underlying auth mechanism actually supports the
registration form handler, preventing 404 errors for other auth types.
**superset/security/manager.py**
```
if (
self.register_superset_registeruser_view
and self.auth_user_registration
and self.auth_type in (AUTH_DB, AUTH_OAUTH)
):
self.registeruser_view = self.appbuilder.add_view_no_menu(
SupersetRegisterUserView
)
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]