can_list on UserOAuthModelView not added to Admin and Alpha when AUTH_TYPE = AUTH_OAUTH
See original GitHub issueA clear and concise description of what the bug is.
Expected results
A user with Admin (or Alpha) role logs in and then requests userinfo or the list of users via the paths /users/userinfo/
or /users/list/
and the relevant data is listed.
Actual results
A user with Admin (or Alpha) role logs in and then requests userinfo or the list of users via the paths /users/userinfo/
or /users/list/
and the user is then
- redirected to
/login
(which is a problem because it should be/login/<provider>
- the user see a the welcome screen
- the requested userinfo or user list is not provided.
Environment
(please complete the following information):
- superset version:
superset version
= Superset 0.35.1 - python version:
python --version
= Python 3.6.8 - node.js version:
node -v
= bash: node: command not found - npm version:
npm -v
= bash: npm: command not found
Checklist
Make sure these boxes are checked before submitting your issue - thank you!
stacktraces
[2020-01-23 18:59:24 +0000] [27934] [DEBUG] GET /users/list/
[WARNING:flask_appbuilder.security.decorators:decorators.py:128 - wraps() ] Access is Denied for: can_list on: UserOAuthModelView
[2020-01-23 18:59:25 +0000] [27938] [DEBUG] GET /login/
[DEBUG:flask_appbuilder.security.views:views.py:631 - login() ] Provider: None
[DEBUG:flask_appbuilder.security.views:views.py:633 - login() ] Already authenticated Terrence Brannon
[2020-01-23 18:59:25 +0000] [27933] [DEBUG] GET /
[2020-01-23 18:59:25 +0000] [27933] [DEBUG] GET /superset/welcome
[2020-01-23 18:59:25 +0000] [27930] [DEBUG] GET /static/appbuilder/css/flags/flags16.css
- [ x] I have reproduced the issue with at least the latest released version of superset.
- [x ] I have checked the issue tracker for the same issue and I haven’t found one similar.
Issue Analytics
- State:
- Created 4 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top Results From Across the Web
can_list on UserOAuthModelView not added to Admin and ...
A clear and concise description of what the bug is. Expected results A user with Admin (or Alpha) role logs in and then...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Try
flask fab create-permissions
, this may mean you have setAUTH_TYPE
on superset_config.py without setting PYTHONPATH.This occurred because
AUTH_ROLE_ADMIN
is set to a particular username.