codeant-ai-for-open-source[bot] commented on code in PR #42472:
URL: https://github.com/apache/superset/pull/42472#discussion_r3656973976
##########
superset/commands/dashboard/importers/v1/utils.py:
##########
@@ -449,10 +449,16 @@ def import_dashboard( # noqa: C901
db.session.flush()
if not existing and user:
- from superset.subjects.utils import get_user_subject
+ from superset.subjects.utils import (
+ get_default_viewers_for_new_asset,
+ get_user_subject,
+ )
subj = get_user_subject(user.id)
if subj and subj not in dashboard.editors:
dashboard.editors.append(subj)
+ for viewer in get_default_viewers_for_new_asset(user.id):
+ if viewer not in dashboard.viewers:
+ dashboard.viewers.append(viewer)
Review Comment:
✅ **Customized review instruction saved!**
**Instruction:**
> Do not flag appending creator-group viewers as expanding explicit
permissions in v1 dashboard imports, because viewers are not read from v1
payloads and are empty for new dashboards.
**Applied to:**
- `superset/commands/dashboard/importers/v1/**`
---
💡 *To manage or update this instruction, visit: [CodeAnt AI
Settings](https://app.codeant.ai/org/settings/learnings)*
--
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]