mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-24 07:19:46 +08:00
update 优化 数据脱敏pr 使用接口提高扩展性
This commit is contained in:
@ -0,0 +1,26 @@
|
||||
package com.ruoyi.system.service.impl;
|
||||
|
||||
import com.ruoyi.common.core.service.SensitiveService;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 脱敏服务
|
||||
* 默认管理员不过滤
|
||||
* 需自行根据业务重写实现
|
||||
*
|
||||
* @author Lion Li
|
||||
* @version 3.6.0
|
||||
*/
|
||||
@Service
|
||||
public class SysSensitiveServiceImpl implements SensitiveService {
|
||||
|
||||
/**
|
||||
* 是否脱敏
|
||||
*/
|
||||
@Override
|
||||
public boolean isSensitive() {
|
||||
return SecurityUtils.isAdmin(SecurityUtils.getUserId());
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user