mirror of https://github.com/rancher/dashboard.git
Apply `redirectUnauthorized: false` when saving roles
- There's situations where the user does not have permision to create certain rules - In those cases ensure we don't log the user out
This commit is contained in:
parent
a1b512194b
commit
0036deb72e
|
|
@ -245,6 +245,18 @@ export default {
|
||||||
cancel() {
|
cancel() {
|
||||||
this.done();
|
this.done();
|
||||||
},
|
},
|
||||||
|
async actuallySave(url) {
|
||||||
|
if ( this.isCreate ) {
|
||||||
|
url = url || this.schema.linkFor('collection');
|
||||||
|
const res = await this.value.save({ url, redirectUnauthorized: false });
|
||||||
|
|
||||||
|
if (res) {
|
||||||
|
Object.assign(this.value, res);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
await this.value.save({ redirectUnauthorized: false });
|
||||||
|
}
|
||||||
|
},
|
||||||
// Detail View
|
// Detail View
|
||||||
verbKey(verb) {
|
verbKey(verb) {
|
||||||
return `has${ ucFirst(verb) }`;
|
return `has${ ucFirst(verb) }`;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue