You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "ProjectsOfMLee (via GitHub)" <gi...@apache.org> on 2023/08/02 22:30:13 UTC

[GitHub] [superset] ProjectsOfMLee commented on issue #18634: RBAC not Working

ProjectsOfMLee commented on issue #18634:
URL: https://github.com/apache/superset/issues/18634#issuecomment-1663055169

   > > Hey guys,
   > > I also had the same issue in both versions `1.5.1` and `2.0.0`.
   > > **BUT** after inspecting the code (specifically func `raise_for_dashboard_access` in branch `2.0` and line [1268](https://github.com/apache/superset/blob/2.0/superset/security/manager.py#L1268)) I figured out that you need your dashboards to be `Published`, but my dashboards were `Draft`
   > > ```python
   > > ...
   > >             can_access = (
   > >                 is_user_admin()
   > >                 or is_owner(dashboard, g.user)
   > >                 or (dashboard.published  and has_rbac_access()).   # <<HERE<<: dashboard.published
   > >                 or (not dashboard.published and not dashboard.roles)
   > >             )
   > >  ...
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > If I set the dashboard status to `Published` everything works like a charm in both `v1.5.1` and `v2.0.0`
   > > I don't know if this solves your issues, but I hope it helps :)
   > 
   > it works for me and my superset verison is 2.1.0. it's interesting the dashboard rbac works on development like run it on PyCharm even though the status is draft, but on live you need to change it to Published.
   
   May I ask how did you resolve this RBAC issue? After publishing my dashboard, I still don't see the role-based access drop-down menu, mine just looks similar to this using v2.1.0
   ![image](https://github.com/apache/superset/assets/104241750/2c20c027-bd39-444b-b8f5-c05963d16c4d)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org