Merge pull request #3822 from richard-cox/master-fix-create-role-no-local-access

[master] Ensure those without access to local cluster can still create cluster & project roles
This commit is contained in:
Richard Cox 2021-08-16 11:34:50 +01:00 committed by GitHub
commit 4756a103d2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@ import ResourceTable from '@/components/ResourceTable';
import Loading from '@/components/Loading';
import { SUBTYPE_MAPPING } from '@/models/management.cattle.io.roletemplate';
import { NAME } from '@/config/product/auth';
import { BLANK_CLUSTER } from '@/store';
const GLOBAL = SUBTYPE_MAPPING.GLOBAL.key;
const CLUSTER = SUBTYPE_MAPPING.CLUSTER.key;
@ -14,14 +15,14 @@ const PROJECT = SUBTYPE_MAPPING.NAMESPACE.key;
const createGlobalRole = {
name: `c-cluster-${ NAME }-roles-resource-create`,
params: {
cluster: 'local',
cluster: BLANK_CLUSTER,
resource: MANAGEMENT.GLOBAL_ROLE,
}
};
const createRoleTemplate = {
name: `c-cluster-${ NAME }-roles-resource-create`,
params: {
cluster: 'local',
cluster: BLANK_CLUSTER,
resource: MANAGEMENT.ROLE_TEMPLATE,
}
};