Token is not changed after logout/login again
- Lingua principale
- TypeScript
- Stelle
- 25.7k
- Fork
- 7.9k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
### Issue type
**I'm submitting a ...** (check one with "x")
* [x] bug report
* [ ] feature request
* [ ] question about the decisions made in the repository
### Issue description
**Current behavior:**
Standard Java/Spring E-Commerce Bundle. The RoleProvider returns an outdated role, it seems the token store is not cleared on logout. Only browser page refresh helps.
**Expected behavior:**
RoleProvider returns the active user role.
**Steps to reproduce:**
1. login with admin
2. logout
3. login with user
The 'users' menu is visible, however, it mustn't be visible only for admin.
**Related code:**
```
PagesMenu
...
return this.accessChecker.isGranted('view', 'users')
.pipe(map(hasAccess => {
if (hasAccess) {
return [...dashboardMenu, ...ordersMenu, userMenu, ...menu];
} else {
return [...dashboardMenu, ...ordersMenu, ...menu];
}
}));
```
### Other information:
**Angular, Nebular**
```
"@agm/core": "^1.0.0-beta.5",
"@angular/animations": "^8.0.0",
"@angular/cdk": "^8.0.0",
"@angular/common": "^8.0.0",
"@angular/compiler": "^8.0.0",
"@angular/core": "^8.0.0",
"@angular/forms": "^8.0.0",
"@angular/platform-browser": "^8.0.0",
"@angular/platform-browser-dynamic": "^8.0.0",
"@angular/router": "^8.0.0",
"@asymmetrik/ngx-leaflet": "3.0.1",
"@nebular/auth": "4.6.0",
"@nebular/eva-icons": "4.6.0",
"@nebular/security": "4.6.0",
"@nebular/theme": "4.6.0",
```
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.