Mayeu opened a new issue, #31938:
URL: https://github.com/apache/superset/issues/31938
### Bug description
Hello 👋,
Activating the `DASHBOARD_RBAC` feature flag doesn't work as intended, we
can't share access to our dashboard that way on our production instance, and it
doesn't work locally either with the example dataset.
1. Checkout master (currently `63843c568255d5f1302815ed7614e93d7febadae`)
2. Activate the `DASHBOARD_RBAC` feature flag in
`docker/pythonpath_dev/superset_config.py`
```python
FEATURE_FLAGS = {"ALERT_REPORTS": True, "DASHBOARD_RBAC": True}
```
4. Start the non-dev compose with: `docker compose -f
docker-compose-non-dev.yml up --build`
5. Create a user, assign it the Gamma role <img width="1142" alt="Image"
src="https://github.com/user-attachments/assets/aba46067-da9a-43fd-ab05-9b68c4d389b3"
/>
5. Open a dashboard, assign it the gamma role, save the dashboard
<img width="889" alt="Image"
src="https://github.com/user-attachments/assets/f760abd6-837e-4ce7-b205-8defdbd89fd2"
/>
6. Open a private browser instance, log as the gamma user, open the
dashboard, get an error (left gamma user, right admin user)
<img width="1918" alt="Image"
src="https://github.com/user-attachments/assets/19b88fe4-a061-4351-8a03-46d1e5d968ba"
/>
Exception in the log:
```
superset_app | 2025-01-21
09:05:48,960:WARNING:superset.views.error_handling:SupersetErrorException
superset_app | Traceback (most recent call last):
superset_app | File
"/app/.venv/lib/python3.11/site-packages/flask/app.py", line 1484, in
full_dispatch_request
superset_app | rv = self.dispatch_request()
superset_app | ^^^^^^^^^^^^^^^^^^^^^^^
superset_app | File
"/app/.venv/lib/python3.11/site-packages/flask/app.py", line 1469, in
dispatch_request
superset_app | return
self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
superset_app |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
superset_app | File
"/app/.venv/lib/python3.11/site-packages/flask_appbuilder/security/decorators.py",
line 109, in wraps
superset_app | return f(self, *args, **kwargs)
superset_app | ^^^^^^^^^^^^^^^^^^^^^^^^
superset_app | File "/app/superset/views/base_api.py", line 120,
in wraps
superset_app | duration, response = time_function(f, self,
*args, **kwargs)
superset_app |
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
superset_app | File "/app/superset/utils/core.py", line 1363, in
time_function
superset_app | response = func(*args, **kwargs)
superset_app | ^^^^^^^^^^^^^^^^^^^^^
superset_app | File "/app/superset/utils/log.py", line 303, in
wrapper
superset_app | value = f(*args, **kwargs)
superset_app | ^^^^^^^^^^^^^^^^^^
superset_app | File "/app/superset/charts/data/api.py", line 239,
in data
superset_app | command.validate()
superset_app | File
"/app/superset/commands/chart/data/get_data_command.py", line 67, in validate
superset_app | self._query_context.raise_for_access()
superset_app | File "/app/superset/common/query_context.py", line
139, in raise_for_access
superset_app | self._processor.raise_for_access()
superset_app | File
"/app/superset/common/query_context_processor.py", line 892, in raise_for_access
superset_app |
security_manager.raise_for_access(query_context=self._query_context)
superset_app | File "/app/superset/security/manager.py", line
2350, in raise_for_access
superset_app | raise SupersetSecurityException(
superset_app | superset.exceptions.SupersetSecurityException: This
endpoint requires the datasource 20, database or `all_datasource_access`
permission
```
### Screenshots/recordings
_No response_
### Superset version
master / latest-dev
### Python version
3.11
### Node version
16
### Browser
Chrome
### Additional context
- I don't know which node version is used in the docker image.
- I used Brave to test this, but I don't think the browser is relevant here.
I have read through various tickets that seems to also encounter this bug,
but no solution describes there solved the issue , and most seems to only be
for older version of Superset (and most where riddle with misleading AI slop).
So I decided to open this ticket to show that even with the example data
this feature flag doesn't seem to work. Or maybe there are missing steps in the
documentation for activating this?
### Checklist
- [x] I have searched Superset docs and Slack and didn't find a solution to
my problem.
- [x] I have searched the GitHub issue tracker and didn't find a similar bug
report.
- [x] I have checked Superset's logs for errors and if I found a relevant
Python stacktrace, I included it here as text in the "additional context"
section.
--
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]