GitHub user bpatra-ai edited a comment on the discussion: Integration of graphs 
to website based on user roles

@dosu
I created 2 types of user role in superset one is Admin will all permission and 
one with Gamma only read permission it could not export anything only dashboard 
view is possible. To integrate in front-end i generated guest-token for Admin 
as well as Gamma.
These are the steps I followed to generate the guest_token for Admin to 
integrate in Front-end:
1. Logged in into superset to get session token with Admin credentials.
2. GET the CSRF token from superset swagger GET API.
3. Then call the /guest_token/ POST API of superset to get the guest token and 
passed below payload to that API
{
  "resources": [
    {
      "type": "dashboard",
      "id": "<dashboard uuid>"
    }
  ],
  "rls":[],
  "user": {
    "first_name": "Admin fn",
    "last_name": "Admin ln",
    "username": "admin"
  }
}
4. Got the token and able to integrate it with proper permission.

But for user follow the same step only the POST payload instead of Admin cred 
passed the user one but the permission is still there what admin has. It did 
not remove the permission for user.
Why so? How to fix this give steps for it?


GitHub link: 
https://github.com/apache/superset/discussions/36322#discussioncomment-15133607

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: 
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to