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


##########
docs/admin_docs/security/security.mdx:
##########
@@ -132,6 +132,33 @@ tables in the **Permissions** dropdown. To select the data 
sources you want to a
 You can then confirm with users assigned to the **Gamma** role that they see 
the
 objects (dashboards and slices) associated with the tables you just extended 
them.
 
+### Actionable Access-Denied Messages
+
+When a viewer opens a chart or dashboard built on a dataset they don't have 
access to, Superset
+shows a plain-language error naming the dataset (or tables, for SQL Lab) and, 
when known, the
+dataset owners to contact. You can also point users at your own access-request 
process by setting
+`PERMISSION_INSTRUCTIONS_LINK` in `superset_config.py`:
+
+```python
+PERMISSION_INSTRUCTIONS_LINK = (
+    
"https://access.example.com/request?dataset={datasource_name}&table={table_names}&user={username}";
+)
+```
+
+The URL may include any of the following placeholders, which are substituted 
with URL-encoded
+values so the link can deep-link into an internal ticketing or access-request 
tool with the
+denied resource pre-filled:
+
+- `{datasource_id}` — id of the denied dataset (chart/dashboard errors only)
+- `{datasource_name}` — name of the denied dataset (chart/dashboard errors 
only)
+- `{table_names}` — comma-separated denied table names (SQL Lab/table errors 
only)
+- `{username}` — the requesting user's username
+
+Only the placeholders that apply to the triggering error type are filled in; 
the rest are replaced
+with an empty string, so a single URL template can cover both chart/dashboard 
and SQL Lab denials.
+A URL with no placeholders is used as-is, and leaving 
`PERMISSION_INSTRUCTIONS_LINK` unset (the
+default) omits the "Request access" link, falling back to owner-contact 
guidance.

Review Comment:
   Good catch, fixed! The owner-contact line doesn't depend on the link at all, 
SQL Lab/table denials never carry owner info so it's always the admin fallback 
regardless. Reworded to say that explicitly.



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