mirror of
https://github.com/dataease/dataease.git
synced 2026-06-09 21:27:21 +08:00
feat:【权限配置】系统变量新增“手机号”字段,支持基于用户账号手机号进行数据权限匹配与控制
This commit is contained in:
@@ -212,7 +212,13 @@ public class PermissionManage {
|
||||
items.add(datasetRowPermissionsTreeItem);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (StringUtils.isNotEmpty(userEntity.getName()) && datasetRowPermissionsTreeItem.getValue().equalsIgnoreCase("${sysParams.userPhone}")) {
|
||||
if(StringUtils.isNotEmpty(userEntity.getPhone())){
|
||||
datasetRowPermissionsTreeItem.setValue(userEntity.getPhone());
|
||||
items.add(datasetRowPermissionsTreeItem);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
String value = handleSysVariable(userEntity, datasetRowPermissionsTreeItem);
|
||||
if (value == null) {
|
||||
continue;
|
||||
|
||||
@@ -924,6 +924,7 @@ export default {
|
||||
user_source: 'Origin',
|
||||
user_label: 'User label',
|
||||
user_email: 'Email',
|
||||
user_phone: 'Mobile phone',
|
||||
dept: 'Organization',
|
||||
role: 'Role'
|
||||
},
|
||||
|
||||
@@ -894,6 +894,7 @@ export default {
|
||||
user_source: '使用者來源',
|
||||
user_label: '使用者標籤',
|
||||
user_email: '信箱',
|
||||
user_phone: '手機號',
|
||||
dept: '組織',
|
||||
role: '角色'
|
||||
},
|
||||
|
||||
@@ -896,6 +896,7 @@ export default {
|
||||
user_source: '用户来源',
|
||||
user_label: '用户标签',
|
||||
user_email: '邮箱',
|
||||
user_phone: '手机号',
|
||||
dept: '组织',
|
||||
role: '角色'
|
||||
},
|
||||
|
||||
@@ -156,6 +156,10 @@ const builtInList = ref([
|
||||
{
|
||||
id: 'sysParams.userEmail',
|
||||
name: t('commons.email')
|
||||
},
|
||||
{
|
||||
id: 'sysParams.userPhone',
|
||||
name: t('auth.sysParams_type.user_phone')
|
||||
}
|
||||
])
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ const valueOptions = valueEnum.map(formatEnum)
|
||||
const sysParams = ['eq', 'not_eq', 'like', 'not like', 'in', 'not in']
|
||||
const textOptionsForSysParams = sysParams.map(formatEnum)
|
||||
|
||||
const sysParamsEnum = ['userId', 'userName', 'userEmail']
|
||||
const sysParamsEnum = ['userId', 'userName', 'userEmail', 'userPhone']
|
||||
|
||||
const sysParamsIlns = sysParamsEnum.map(_ => {
|
||||
return { value: `\${sysParams.${_}}`, label: `auth.sysParams_type.${toLine(_)}` }
|
||||
|
||||
Reference in New Issue
Block a user