superset icon indicating copy to clipboard operation
superset copied to clipboard

Still fetching fav-star data when no user is logged in

Open aspedrosa opened this issue 7 years ago • 9 comments

By giving the permissions:

  • can dashboard on Superset
  • can csrf token on Superset
  • can explore json on Superset
  • can list on CssTemplateAsyncModelView
  • all datasource access on all_datasource_access

to the public role, any non logged in user can explore any dashboard. However, even with no user logged in, frontend app still tries to fetch the favorite status of the current dashboard.

Expected results

Verify if a user is logged in and only if it is then fetch the favorite status of the current dashboard.

Actual results

The favorite status of the current dashboard is always fetched

Screenshots

fav-start-showing

How to reproduce the bug

  1. Give the permissions mentioned on the beggining of the issue to the public role
  2. Log out
  3. Go to the url of any dashboard
  4. See toast and fav-start still showing

Environment

Checklist

Make sure these boxes are checked before submitting your issue - thank you!

  • [X] I have checked the superset logs for python stacktraces and included it here as text if there are any.
  • [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.

Additional context

aspedrosa avatar Nov 04 '19 15:11 aspedrosa

Issue-Label Bot is automatically applying the label #bug to this issue, with a confidence of 0.82. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

issue-label-bot[bot] avatar Nov 04 '19 15:11 issue-label-bot[bot]

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue .pinned to prevent stale bot from closing the issue.

stale[bot] avatar Jan 03 '20 19:01 stale[bot]

Fixed with #8527

aspedrosa avatar May 05 '20 17:05 aspedrosa

Hello. the bug started playing again after changes in April 2021

EdwardVargatuk avatar May 28 '21 09:05 EdwardVargatuk

Hey, same issue here.. it's happening again !

n19besson avatar Jun 07 '21 09:06 n19besson

Found the source of the new bug The code shows this line. The variable dashboardInfo.userId is a valid string so react renders the FaveStar component.

bug_favstar

Don't know who to tag, so I will tag the ones that reviewed the PR that fixed the previous version of this bug @etr2460 @nytai

aspedrosa avatar Jun 17 '21 18:06 aspedrosa

Any idea

Found the source of the new bug The code shows this line. The variable dashboardInfo.userId is a valid string so react renders the FaveStar component.

bug_favstar

Don't know who to tag, so I will tag the ones that reviewed the PR that fixed the previous version of this bug @etr2460 @nytai

Any idea when this can be fixed? Kind of annoying when showing a dashboard to public.

hatbout avatar Jul 14 '21 19:07 hatbout

This was fixed by https://github.com/apache/superset/pull/15590

nytai avatar Jul 14 '21 19:07 nytai

This was fixed by #15590

Thanks a lot! I just pulled the newest docker image and deployed again. I can confirm this bug is gone!

hatbout avatar Jul 14 '21 21:07 hatbout