mirror of https://github.com/rancher/ui.git
parent
02e31e6d28
commit
b51b28f5cc
|
|
@ -10,6 +10,7 @@ import { isArray } from '@ember/array';
|
|||
|
||||
const USER = 'user';
|
||||
const ADMIN = 'admin';
|
||||
const RESTRICTED_ADMIN = 'restricted-admin';
|
||||
const BASE = 'user-base';
|
||||
const LOGIN_ACCESS_ROLES = [
|
||||
{
|
||||
|
|
@ -22,6 +23,11 @@ const LOGIN_ACCESS_ROLES = [
|
|||
translationKey: 'formGlobalRoles.mode.admin.label',
|
||||
descriptionTranslationKey: 'formGlobalRoles.mode.admin.detail',
|
||||
},
|
||||
{
|
||||
name: RESTRICTED_ADMIN,
|
||||
translationKey: 'formGlobalRoles.mode.restrictedAdmin.label',
|
||||
descriptionTranslationKey: 'formGlobalRoles.mode.restrictedAdmin.detail',
|
||||
},
|
||||
{
|
||||
name: BASE,
|
||||
translationKey: 'formGlobalRoles.mode.userBase.label',
|
||||
|
|
@ -66,7 +72,7 @@ export default Component.extend({
|
|||
baseRoles: computed('allRoles.[]', function() {
|
||||
const { allRoles } = this;
|
||||
|
||||
return [ADMIN, USER, BASE].map((r) => allRoles.findBy('id', r)).compact();
|
||||
return [ADMIN, RESTRICTED_ADMIN, USER, BASE].map((r) => allRoles.findBy('id', r)).compact();
|
||||
}),
|
||||
|
||||
make(role) {
|
||||
|
|
@ -120,7 +126,7 @@ export default Component.extend({
|
|||
initRoles() {
|
||||
setProperties(this, {
|
||||
baseRoles: this.baseRoles.map(this.roleMapper.bind(this)),
|
||||
additionalRoles: this.allRoles.filterBy('isHidden', false).filterBy('builtin').map(this.roleMapper.bind(this)),
|
||||
additionalRoles: this.allRoles.filterBy('isHidden', false).filterBy('builtin').filter((role) => role.id !== 'restricted-admin').map(this.roleMapper.bind(this)),
|
||||
userRoles: this.allRoles.filterBy('isHidden', false).filterBy('builtin', false).map(this.roleMapper.bind(this))
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -6349,6 +6349,9 @@ formGlobalRoles:
|
|||
custom:
|
||||
label: Built-in
|
||||
detail: Additional roles to define more fine-grain permissions model.
|
||||
restrictedAdmin:
|
||||
label: Restricted Administrator
|
||||
detail: Restricted Admins have full control over all resources in all downstream clusters but no access to the local cluster.
|
||||
role:
|
||||
clusters-create:
|
||||
label: Create new Clusters
|
||||
|
|
|
|||
Loading…
Reference in New Issue