12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using Infrastructure;
- using SqlSugar.IOC;
- using Util;
- namespace ServiceCore
- {
- public class DataPermiSevice
- {
-
-
-
-
- public static void FilterData(int configId)
- {
-
- var user = JwtUtil.GetLoginUser(App.HttpContext);
- if (user == null) return;
- var db = DbScoped.SugarScope.GetConnectionScope(configId);
- foreach (var role in user.Roles.OrderBy(f => f.DataScope))
- {
- var dataScope = (DataPermiEnum)role.DataScope;
- if (DataPermiEnum.All.Equals(dataScope))
- {
- break;
- }
- else if (DataPermiEnum.CUSTOM.Equals(dataScope))
- {
- }
- else if (DataPermiEnum.DEPT.Equals(dataScope))
- {
- }
- else if (DataPermiEnum.DEPT_CHILD.Equals(dataScope))
- {
- }
- else if (DataPermiEnum.SELF.Equals(dataScope))
- {
- }
- }
- }
- }
- }
|