question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

can_list on UserOAuthModelView not added to Admin and Alpha when AUTH_TYPE = AUTH_OAUTH

See original GitHub issue

A 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

  1. redirected to /login (which is a problem because it should be /login/<provider>
  2. the user see a the welcome screen
  3. 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:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
dpgasparcommented, Jan 24, 2020

Try flask fab create-permissions, this may mean you have set AUTH_TYPE on superset_config.py without setting PYTHONPATH.

0reactions
metaperlcommented, Jan 28, 2020

it created a new role, that is named the same as the username who is configured as admin in superset_config.py.

This occurred because AUTH_ROLE_ADMIN is set to a particular username.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found