mirror of https://github.com/rancher/dashboard.git
Fix association of 'me' principal to OIDC provider
- When enabling oidc the principal tagged with me should be added to the providers `allowedPrincipalIds` collection - This wasn't happenening due to a code change (`me` --> `principal`)
This commit is contained in:
parent
1f0e95beff
commit
488c7aeada
|
|
@ -160,12 +160,12 @@ export default {
|
||||||
|
|
||||||
this.model.allowedPrincipalIds = this.model.allowedPrincipalIds || [];
|
this.model.allowedPrincipalIds = this.model.allowedPrincipalIds || [];
|
||||||
|
|
||||||
if ( this.me) {
|
if ( this.principal) {
|
||||||
if (!this.model.allowedPrincipalIds.includes(this.me.id) ) {
|
if (!this.model.allowedPrincipalIds.includes(this.principal.id) ) {
|
||||||
addObject(this.model.allowedPrincipalIds, this.me.id);
|
addObject(this.model.allowedPrincipalIds, this.principal.id);
|
||||||
}
|
}
|
||||||
// Session has switched to new 'me', ensure we react
|
// Session has switched to new 'me', ensure we react
|
||||||
this.$store.commit('auth/loggedInAs', this.me.id);
|
this.$store.commit('auth/loggedInAs', this.principal.id);
|
||||||
} else {
|
} else {
|
||||||
console.warn(`Unable to find principal marked as 'me'`); // eslint-disable-line no-console
|
console.warn(`Unable to find principal marked as 'me'`); // eslint-disable-line no-console
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue