dosubot[bot] commented on issue #28760:
URL: https://github.com/apache/superset/issues/28760#issuecomment-2137156033
<!-- Greeting -->
@Zarrina1 Hello there! I'm here to help you with any bugs, questions, or
contributions you have for the repository. Let's squash those bugs together! 🤖
<!-- Answer -->
To resolve the issue where a Gamma role user can see some datasets in the
Dataset folder but cannot see the related dashboards for those datasets in
Superset version 2.1.0, follow these steps:
1. **Ensure Gamma Role Permissions**: Verify that the Gamma role user has
access to the data sources used in the dashboards. Gamma users can only view
slices and dashboards made from data sources they have access to.
2. **Create a Complementary Role**:
- Go to `Menu -> Security -> List Roles` and click the `+` sign.
- Name the new role, assign it to users, and select the tables in the
**Permissions** dropdown.
- Use the typeahead to search for your table names and select the data
sources you want to associate with this role.
3. **Assign the New Role**:
- Assign this new role to the Gamma role user.
- Confirm with the user that they can see the objects (dashboards and
slices) associated with the tables you just extended them.
4. **Check Dashboard Publication**: Ensure that the dashboards are
published. Dashboards need to be published for them to be visible to users.
Verify this by checking the `published` attribute of the dashboards.
5. **Verify Permissions**: Use the `can_access_dashboard` method to check if
the user has the necessary permissions to access the dashboard:
```python
def can_access_dashboard(self, dashboard: "Dashboard") -> bool:
try:
self.raise_for_access(dashboard=dashboard)
except SupersetSecurityException:
return False
return True
```
By following these steps, you should be able to resolve the issue and ensure
that the Gamma role user can see the related dashboards for the datasets they
have access to
<sup>[[1]](https://github.com/apache/superset/blob/master/docs/docs/security/security.mdx)</sup><sup>[[2]](https://github.com/apache/superset/blob/master/CHANGELOG/2.1.0.md)</sup><sup>[[3]](https://github.com/apache/superset/blob/master/tests/integration_tests/dashboard_tests.py)</sup><sup>[[4]](https://github.com/apache/superset/blob/master/superset/security/manager.py)</sup><sup>[[5]](https://github.com/apache/superset/blob/master/tests/integration_tests/dashboards/security/security_dataset_tests.py)</sup>.
<!-- Dosu Comment Footer -->
<details open>
<summary>
#### Details
</summary>
**About Dosu**
This response is meant to be useful and save you time. It is **not meant to
be a precise solution**, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is
irrelevant.
</details>
*To continue the conversation, mention @dosu.*
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]