aminghadersohi commented on code in PR #45375:
URL: https://github.com/apache/superset/pull/45375#discussion_r4342083079
##########
superset-frontend/src/hooks/apiResources/schemas.ts:
##########
@@ -46,7 +46,9 @@ const schemaApi = api.injectEndpoints({
// TODO: Would be nice to add pagination in a follow-up. Needs
endpoint changes.
urlParams: {
force: forceRefresh,
- ...(catalog !== undefined && { catalog }),
+ ...(catalog !== undefined && {
+ catalog: encodeURIComponent(catalog),
Review Comment:
Catalogs containing spaces or `:` become bare Rison identifiers after URL
decoding, so schema and table requests return 400. Encode the complete Rison
query rather than individual catalog values.
##########
superset-frontend/src/features/roles/utils.ts:
##########
@@ -58,7 +58,11 @@ export const updateRoleName = async (roleId: number, name:
string) =>
export const formatPermissionLabel = (
permissionName: string,
viewMenuName: string,
-) => `${permissionName.replace(/_/g, ' ')} ${viewMenuName.replace(/_/g, ' ')}`;
+) =>
+ `${permissionName.replace(/_/g, ' ')} ${viewMenuName.replace(/_/g, '
')}`.replace(
+ /%2e/gi,
+ '.',
+ );
Review Comment:
With all permissions loaded, searching `demo%2Emetrics` hides its matching
option: the label now contains `demo.metrics`, but
`PermissionsField.filterOption` only normalizes underscores. Normalize encoded
dots in that filter too.
--
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]