fix: Use role permissions from accounts instead of role attribute (#3445)

Use role permissions from accounts instead of the role attribute

Fixes: #2557
This commit is contained in:
Pranav Raj S
2021-11-23 17:37:01 +05:30
committed by GitHub
parent 11cd7fd6c5
commit 0530e9491c
3 changed files with 31 additions and 26 deletions

View File

@@ -47,8 +47,11 @@ export const getters = {
return currentAccount.availability;
},
getCurrentAccountId(_state) {
return _state.currentAccountId;
getCurrentAccountId(_, __, rootState) {
if (rootState.route.params && rootState.route.params.accountId) {
return Number(rootState.route.params.accountId);
}
return null;
},
getCurrentRole(_state) {