GitHub user dosubot[bot] added a comment to the discussion: Question: 
Encountered "Failed to save slice" error when saving chart to dashboard

<!-- Answer -->
Based on your role configuration, the Gamma role does include [`can write on 
Chart`](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/RESOURCES/STANDARD_ROLES.md)
 by default, so that's not the issue. However, there are a few things to verify:

**Most likely cause: Datasource access mismatch**

Even with `can write on Chart`, Gamma users are [restricted to datasources 
they've been explicitly granted access 
to](https://github.com/apache/superset/issues/31938#issuecomment-2604121619). 
Make sure the **WAREHOUSE_RW** role includes `datasource_access` on the **exact 
dataset** the chart is using—not just the database or table, but the specific 
Superset dataset object.

**Other permissions to check:**

1. **Chart ownership** – If the user is trying to overwrite someone else's 
chart, they won't have permission unless they're listed as an owner of that 
chart
2. **Dashboard ownership** – If adding to a dashboard, the user must be an 
owner of that dashboard
3. **`can read on Dataset`** and **`can read on Database`** – [These are 
sometimes needed alongside 
datasource_access](https://github.com/apache/superset/discussions/34353#discussioncomment-13911542)

**Quick test:** Have the user try saving the chart as a **new chart** (not 
overwriting) without adding it to any dashboard. If that works, the issue is 
likely ownership-related. If it still fails, it's almost certainly a datasource 
access issue.

Could you check the backend logs for the full error message? It usually 
specifies exactly which permission is missing.


<!-- Dosu Comment Footer -->
*To reply, just mention 
[@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=brand-link).*

---
<sup>How did I do? 
[Good](https://app.dosu.dev/response-feedback/c039fdfc-7500-4dca-82cd-e22597fe38b4?feedback_type=great_response&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-great_response)
 | 
[Irrelevant](https://app.dosu.dev/response-feedback/c039fdfc-7500-4dca-82cd-e22597fe38b4?feedback_type=irrelevant_answer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-irrelevant_answer)
 | 
[Incorrect](https://app.dosu.dev/response-feedback/c039fdfc-7500-4dca-82cd-e22597fe38b4?feedback_type=incorrect_sources&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-incorrect_sources)
 | 
[Verbose](https://app.dosu.dev/response-feedback/c039fdfc-7500-4dca-82cd-e22597fe38b4?feedback_type=too_verbose&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-too_verbose)
 | [Hallucination](https://app.dosu.dev/response-feedback/c039fdfc-7500-4d
 
ca-82cd-e22597fe38b4?feedback_type=hallucination&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-hallucination)
 | [Report 
🐛](https://app.dosu.dev/response-feedback/c039fdfc-7500-4dca-82cd-e22597fe38b4?feedback_type=bug_report&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-bug_report)
 | 
[Other](https://app.dosu.dev/response-feedback/c039fdfc-7500-4dca-82cd-e22597fe38b4?feedback_type=other&utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=feedback-other)</sup>

[![Chat with 
Dosu](https://dosu.dev/dosu-chat-badge.svg)](https://app.dosu.dev/a28d3c7e-a9d3-459e-9fb6-3a6f9ff4f357/ask?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=chat-badge)&nbsp;[![Open
 in 
Cursor](https://dosu.dev/dosu-in-cursor.svg)](https://cursor.com/link/prompt?text=Based%20on%20your%20role%20configuration%2C%20the%20Gamma%20role%20does%20include%20%5B%60can%20write%20on%20Chart%60%5D%28https%3A//github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/RESOURCES/STANDARD_ROLES.md%29%20by%20default%2C%20so%20that%27s%20not%20the%20issue.%20However%2C%20there%20are%20a%20few%20things%20to%20verify%3A%0A%0A%2A%2AMost%20likely%20cause%3A%20Datasource%20access%20mismatch%2A%2A%0A%0AEven%20with%20%60can%20write%20on%20Chart%60%2C%20Gamma%20users%20are%20%5Brestricted%20to%20datasources%20they%27ve%20been%20explicitly%20granted%20access%20to%5D%28https%3A//github.com/apache/superset/issues/31938%23issuecomment-2604121619%29.%20Ma
 
ke%20sure%20the%20%2A%2AWAREHOUSE_RW%2A%2A%20role%20includes%20%60datasource_access%60%20on%20the%20%2A%2Aexact%20dataset%2A%2A%20the%20chart%20is%20using%E2%80%94not%20just%20the%20database%20or%20table%2C%20but%20the%20specific%20Superset%20dataset%20object.%0A%0A%2A%2AOther%20permissions%20to%20check%3A%2A%2A%0A%0A1.%20%2A%2AChart%20ownership%2A%2A%20%E2%80%93%20If%20the%20user%20is%20trying%20to%20overwrite%20someone%20else%27s%20chart%2C%20they%20won%27t%20have%20permission%20unless%20they%27re%20listed%20as%20an%20owner%20of%20that%20chart%0A2.%20%2A%2ADashboard%20ownership%2A%2A%20%E2%80%93%20If%20adding%20to%20a%20dashboard%2C%20the%20user%20must%20be%20an%20owner%20of%20that%20dashboard%0A3.%20%2A%2A%60can%20read%20on%20Dataset%60%2A%2A%20and%20%2A%2A%60can%20read%20on%20Database%60%2A%2A%20%E2%80%93%20%5BThese%20are%20sometimes%20needed%20alongside%20datasource_access%5D%28https%3A//github.com/apache/superset/discussions/34353%23discussioncomment-13911542%29%0A%0A%2A%2AQui
 
ck%20test%3A%2A%2A%20Have%20the%20user%20try%20saving%20the%20chart%20as%20a%20%2A%2Anew%20chart%2A%2A%20%28not%20overwriting%29%20without%20adding%20it%20to%20any%20dashboard.%20If%20that%20works%2C%20the%20issue%20is%20likely%20ownership-related.%20If%20it%20still%20fails%2C%20it%27s%20almost%20certainly%20a%20datasource%20access%20issue.%0A%0ACould%20you%20check%20the%20backend%20logs%20for%20the%20full%20error%20message%3F%20It%20usually%20specifies%20exactly%20which%20permission%20is%20missing.)&nbsp;[![Join
 
Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-assistant&utm_content=join-discord)&nbsp;[![Share
 on 
X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/superset/discussions/38618)

GitHub link: 
https://github.com/apache/superset/discussions/38618#discussioncomment-16111411

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