|
@@ -53,16 +53,12 @@ public class DataPermissionManager : IDataPermissionManager, IScopeDependency
|
|
|
{
|
|
|
using var scope = _serviceScopeFactory.CreateScope();
|
|
|
var systemDataTableRepository = scope.ServiceProvider.GetService<ISystemDataTableRepository>();
|
|
|
- var systemDataAuthorityRepository = scope.ServiceProvider.GetService<ISystemDataTableRepository>();
|
|
|
+ var systemDataAuthorityRepository = scope.ServiceProvider.GetService<ISystemDataAuthorityRepository>();
|
|
|
|
|
|
////查询对应表配置
|
|
|
- //var tableModel = _systemDataTableRepository.GetAsync(x => x.EntityName == entityName).Result;
|
|
|
- ////查询表对应数据权限
|
|
|
- //var authList = _systemDataAuthorityRepository.QueryExtAsync(x => roles.Contains(x.RoleCode),null,x=>x.OrderBy(d=>d.AuthorityType)).Result;
|
|
|
- //if (authList!=null && authList.Count>0)
|
|
|
- //{
|
|
|
- // return (EAuthorityType)authList[0].AuthorityType;
|
|
|
- //}
|
|
|
- return null;
|
|
|
+ var tableModel = systemDataTableRepository!.GetAsync(x => x.EntityName == entityName).Result;
|
|
|
+ ////查询表对应最高数据权限
|
|
|
+ var auth = systemDataAuthorityRepository!.GetMyTopDataAuth(roles, tableModel!.Id);
|
|
|
+ return auth;
|
|
|
}
|
|
|
}
|