rusackas commented on code in PR #43458:
URL: https://github.com/apache/superset/pull/43458#discussion_r3982402265


##########
superset/security/manager.py:
##########
@@ -2512,8 +2527,10 @@ def get_datasource_access_error_object(  # pylint: 
disable=invalid-name
             level=ErrorLevel.WARNING,
             extra={
                 "link": self.get_datasource_access_link(datasource),
+                # is_access_denial lets the frontend show the "Request access"
+                # UI without receiving the dataset name.
+                "is_access_denial": True,
                 "datasource": datasource.data["id"],

Review Comment:
   One way to answer sadpandajoe's question above without a staged rollout: 
send back a non-identifying placeholder instead of omitting the key entirely. 
Old frontends check `datasource_name` for truthiness and interpolate it 
straight into the message, so a generic string satisfies both without ever 
carrying the real name.
   
   ```suggestion
                   "datasource": datasource.data["id"],
                   # Legacy placeholder for frontends built before 
is_access_denial
                   # existed (pre-#43458): satisfies their truthy check on
                   # datasource_name so the request-access UI still renders 
during
                   # a rolling deploy, without ever carrying the real name.
                   "datasource_name": _("a dataset"),
   ```



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

Reply via email to