mirror of
https://github.com/cool-team-official/cool-admin-midway.git
synced 2024-11-01 22:20:30 +08:00
单点登录未开启的情况下,不清除用户缓存
This commit is contained in:
parent
6f7e58662b
commit
9326dd8e9c
@ -162,6 +162,7 @@ export class BaseSysLoginService extends BaseService {
|
|||||||
* 退出登录
|
* 退出登录
|
||||||
*/
|
*/
|
||||||
async logout() {
|
async logout() {
|
||||||
|
if (!this.coolConfig.jwt.sso) return;
|
||||||
const { userId } = this.ctx.admin;
|
const { userId } = this.ctx.admin;
|
||||||
await this.cacheManager.del(`admin:department:${userId}`);
|
await this.cacheManager.del(`admin:department:${userId}`);
|
||||||
await this.cacheManager.del(`admin:perms:${userId}`);
|
await this.cacheManager.del(`admin:perms:${userId}`);
|
||||||
|
Loading…
Reference in New Issue
Block a user