rusackas commented on code in PR #44101:
URL: https://github.com/apache/superset/pull/44101#discussion_r4312475915
##########
tests/integration_tests/core_tests.py:
##########
@@ -953,6 +953,49 @@ def test_dashboard_permalink_returns_404_for_missing_state(
assert resp.status_code == 404
assert "Location" not in resp.headers
+ def test_extension_view_anonymous_redirects_to_login(self):
+ resp = self.client.get("/extensions/view/my-ext.settings")
+
+ expected_url = "/login/?next=%2Fextensions%2Fview%2Fmy-ext.settings"
+
+ assert resp.status_code == 302
+ assert resp.headers["Location"] == expected_url
+
+ def test_extension_view_authenticated_returns_spa_shell(self):
+ self.login(ADMIN_USERNAME)
+
+ resp = self.client.get("/extensions/view/my-ext.settings")
Review Comment:
Parametrized the authenticated test over the dotted, literal-slash and `%2F`
forms, all asserting 200 and `id="app"`.
##########
superset-frontend/src/features/home/RightMenu.tsx:
##########
@@ -521,6 +527,31 @@ const RightMenu = ({
}
});
+ const extensionSettingsItems = (settingsMenuExtension?.primary ?? [])
+ .map(menuItem => {
+ const command = commands.getCommand(menuItem.command);
+ if (!command) {
+ return null;
+ }
+ return {
+ key: command.id,
Review Comment:
Good call. The item key is now `extension:${command.id}`, and
`executeCommand` still gets the original id.
--
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]