mistercrunch commented on code in PR #27779:
URL: https://github.com/apache/superset/pull/27779#discussion_r2271174116
##########
superset-frontend/src/dashboard/util/permissionUtils.ts:
##########
@@ -24,17 +24,17 @@ import {
} from 'src/types/bootstrapTypes';
import { Dashboard } from 'src/types/Dashboard';
import { findPermission } from 'src/utils/findPermission';
+import getBootstrapData from 'src/utils/getBootstrapData';
-// this should really be a config value,
-// but is hardcoded in backend logic already, so...
-const ADMIN_ROLE_NAME = 'admin';
+const bootstrapData = getBootstrapData();
+const ADMIN_ROLE_NAME = bootstrapData.common.conf.AUTH_ROLE_ADMIN || 'Admin';
Review Comment:
Mmmmh, seems `ADMIN_ROLE_NAME != AUTH_ROLE_ADMIN`. AUTH_ROLE_ADMIN probably
exist do it can diverge from the global ADMIN_ROLE - assuming this exists.
Maybe FAB exposes it somewhere? Would have to be carried to the frontend?
--
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]