Fix sandbox guard stakeholder in data.
This commit is contained in:
parent
f55d0d3a8f
commit
9bf8001f41
|
@ -24,7 +24,13 @@ export class SandboxGuard {
|
|||
if (childRoute.data['researcher'] && childRoute.params.stakeholder && sandbox) {
|
||||
return this.checkResearcher(state.url, childRoute.params.stakeholder);
|
||||
} else {
|
||||
return !sandbox || this.check(state.url, childRoute.data?.stakeholder?childRoute.data.stakeholder:childRoute.params.stakeholder);
|
||||
let alias = childRoute.params.stakeholder;
|
||||
let route = childRoute;
|
||||
while (!alias && route) {
|
||||
alias = route.data.stakeholder;
|
||||
route = route.parent;
|
||||
}
|
||||
return !sandbox || this.check(state.url, alias);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue