Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Activate user checkbox fails when using LDAP authentication. #754

Closed
gadam0 opened this issue Jul 13, 2016 · 0 comments · Fixed by #1138
Closed

Activate user checkbox fails when using LDAP authentication. #754

gadam0 opened this issue Jul 13, 2016 · 0 comments · Fixed by #1138

Comments

@gadam0
Copy link

gadam0 commented Jul 13, 2016

I am running Caravel 0.10.10 and I am using AUTH_LDAP for user authentication.

After I add a user from the web UI, clicking the checkbox to toggle the user's active status produces this stack trace.

Traceback (most recent call last):
  File "$PREFIX/lib/python2.7/site-packages/caravel/views.py", line 65, in wraps
    return f(self, *args, **kwargs)
  File "$PREFIX/lib/python2.7/site-packages/flask_appbuilder/security/decorators.py", line 52, in wraps
    return f(self, *args, **kwargs)
  File "$PREFIX/lib/python2.7/site-packages/caravel/views.py", line 964, in checkbox
    model_view_cls = getattr(views, model_view)
AttributeError: 'module' object has no attribute 'UserLDAPModelView'

This is the request that causes the exception.
http://localhost:8088/caravel/checkbox/UserLDAPModelView/5/active/false

This is the section where the error is occurring.
https://github.com/airbnb/caravel/blob/18b8e6fa5816982263faaaf6f49a45c6a0fe58b1/caravel/views.py#L988-L1001

Would importing the built-in views from flask appbuilder into the views module be the best solution or is there a better fix?

from flask_appbuilder.security.views import *
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 17, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 24, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 25, 2021
zhaoyongjie pushed a commit to zhaoyongjie/incubator-superset that referenced this issue Nov 26, 2021
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 a pull request may close this issue.

2 participants