单点登录未开启的情况下,不清除用户缓存

This commit is contained in:
cool 2023-11-29 15:23:11 +08:00
parent 6f7e58662b
commit 9326dd8e9c

View File

@ -162,6 +162,7 @@ export class BaseSysLoginService extends BaseService {
* 退
*/
async logout() {
if (!this.coolConfig.jwt.sso) return;
const { userId } = this.ctx.admin;
await this.cacheManager.del(`admin:department:${userId}`);
await this.cacheManager.del(`admin:perms:${userId}`);