Rodrigo507 opened a new issue #21847:
URL: https://github.com/apache/airflow/issues/21847
### Apache Airflow version
2.2.3
### What happened
I am trying to enable user registration, by configuring the
"webserver_config.py" file.
I have set the AUTH_USER_REGISTRATION variable to True and I have restarted
the "webserver" container. I also tried performing down to the services and
again up to the services and the error continues.
Once enabled the variable already mentioned in the "Login" panel the
Register button is shown, but when accessing the "Register" it shows the
following error.
```
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line
2447, in wsgi_app
response = self.full_dispatch_request()
File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line
1952, in full_dispatch_request
rv = self.handle_user_exception(e)
File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line
1821, in handle_user_exception
reraise(exc_type, exc_value, tb)
File "/home/airflow/.local/lib/python3.7/site-packages/flask/_compat.py",
line 39, in reraise
raise value
File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line
1950, in full_dispatch_request
rv = self.dispatch_request()
File "/home/airflow/.local/lib/python3.7/site-packages/flask/app.py", line
1936, in dispatch_request
return self.view_functions[rule.endpoint](**req.view_args)
File
"/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/views.py",
line 127, in this_form_get
self.form_get(form)
File
"/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/security/registerviews.py",
line 175, in form_get
self.add_form_unique_validations(form)
File
"/home/airflow/.local/lib/python3.7/site-packages/flask_appbuilder/security/registerviews.py",
line 155, in add_form_unique_validations
datamodel_user = self.appbuilder.sm.get_user_datamodel
AttributeError: 'AirflowSecurityManager' object has no attribute
'get_user_datamodel'
```
I should add that both the "airflow.cfg" and "webserver_config.py" file I
have as volume so as not to lose the configuration.
### What you expected to happen
That users have a form where they must fill out the registration
information, and then be able to access
### How to reproduce
The variable AUTH_USER_REGISTRATION = True must be enabled in the file
"webserver_config.py", verify that the variable AUTH_TYPE has AUTH_DB as value
and finally validate that AUTH_DB is imported.
### Operating System
Docker
### Versions of Apache Airflow Providers
Python version: 3.7.12
Airflow version: 2.2.3
### Deployment
Docker-Compose
### Deployment details
Docker version is 4.2.0
Host operating system is Windows 10 version 20H2 (OS Build 19042.1526)
In the Host operating system, WSL 2 is enabled.
### Anything else
_No response_
### Are you willing to submit PR?
- [X] Yes I am willing to submit a PR!
### Code of Conduct
- [X] I agree to follow this project's [Code of
Conduct](https://github.com/apache/airflow/blob/main/CODE_OF_CONDUCT.md)
--
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]