-
Notifications
You must be signed in to change notification settings - Fork 17k
a bug with security manager #14524
Description
I am using the newest version 1.2 of superset,i download it via git clone.
recently i have been having a bug with security manager, it could happen anytime,but basically whenever i am doing something related to role control, i would be sent to an empty page says
{"errors": [{"message": "'SupersetSecurityManager' object has no attribute 'get_role_permissions'", "error_type": "GENERIC_BACKEND_ERROR", "level": "error", "extra": {"issue_codes": [{"code": 1011, "message": "Issue 1011 - Superset encountered an unexpected error."}]}}]}
this could happen anytime, either when i am logged in and try to click any dataset or when i successfully get the dataset for a while and then click it again the error pops up
i think this might be sth related to role control but I am not sure, i tried to search for the definition of security_manager in the source code but i have not found it yet.
while i am logged in as an administrator, i am not able to delete any datasets as it says 'There was an issue deleting: Unicode Cloud'
Expected results
get datasets or delete datasets
Actual results
sent to an empty page says the bug
Screenshots
superset_app | 2021-05-07 12:42:58,406:ERROR:superset.views.base:'SupersetSecurityManager' object has no attribute 'get_role_permissions'
superset_app | Traceback (most recent call last):
superset_app | File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1950, in full_dispatch_request
superset_app | rv = self.dispatch_request()
superset_app | File "/usr/local/lib/python3.7/site-packages/flask/app.py", line 1936, in dispatch_request
superset_app | return self.view_functionsrule.endpoint
superset_app | File "/usr/local/lib/python3.7/site-packages/flask_appbuilder/security/decorators.py", line 109, in wraps
superset_app | return f(self, *args, **kwargs)
superset_app | File "/app/superset/utils/log.py", line 228, in wrapper
superset_app | value = f(*args, **kwargs)
superset_app | File "/app/superset/views/core.py", line 803, in explore
superset_app | "user": bootstrap_user_data(g.user, include_perms=True),
superset_app | File "/app/superset/views/utils.py", line 77, in bootstrap_user_data
superset_app | roles, permissions = get_permissions(user)
superset_app | File "/app/superset/views/utils.py", line 94, in get_permissions
superset_app | permissions_ = security_manager.get_role_permissions(role)
superset_app | File "/usr/local/lib/python3.7/site-packages/werkzeug/local.py", line 347, in getattr
superset_app | return getattr(self._get_current_object(), name)
superset_app | AttributeError: 'SupersetSecurityManager' object has no attribute 'get_role_permissions'
How to reproduce the bug
I actually do not know how to produce this, but even if i do 'rm -rf superset' and 'rm -rf .git' then re-clone the repo it would happen again
Environment
(please complete the following information):
- superset version: v1.2
- python version:
- node.js version:
Checklist
Make sure to follow these steps before submitting your issue - thank you!
- [ chekced ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
- [ chekced ] I have reproduced the issue with at least the latest released version of superset.
- [ chekced ] I have checked the issue tracker for the same issue and I haven't found one similar.