去除引用common.props
This commit is contained in:
@@ -3,14 +3,12 @@ using JNPF.Common.Core.Manager.Files;
|
||||
using JNPF.Common.Enums;
|
||||
using JNPF.Common.Extension;
|
||||
using JNPF.Common.Filter;
|
||||
using JNPF.Common.Models.User;
|
||||
using JNPF.Common.Security;
|
||||
using JNPF.DependencyInjection;
|
||||
using JNPF.DynamicApiController;
|
||||
using JNPF.FriendlyException;
|
||||
using JNPF.Systems.Entitys.Permission;
|
||||
using JNPF.Systems.Entitys.System;
|
||||
using JNPF.Systems.Interfaces.Common;
|
||||
using JNPF.VisualDev.Entitys;
|
||||
using JNPF.VisualDev.Entitys.Dto.Portal;
|
||||
using JNPF.VisualDev.Entitys.Dto.VisualDev;
|
||||
@@ -169,7 +167,7 @@ public class PortalService : IDynamicApiController, ITransient
|
||||
{
|
||||
if (_userManager.Roles != null && !_userManager.IsAdministrator)
|
||||
{
|
||||
List<string>? roleId = await _portalRepository.AsSugarClient().Queryable<RoleEntity>().Where(r =>_userManager.Roles.Contains(r.Id)).Where(r => r.EnabledMark == 1 && r.DeleteMark == null).Select(r => r.Id).ToListAsync();
|
||||
List<string>? roleId = await _portalRepository.AsSugarClient().Queryable<RoleEntity>().Where(r => _userManager.Roles.Contains(r.Id)).Where(r => r.EnabledMark == 1 && r.DeleteMark == null).Select(r => r.Id).ToListAsync();
|
||||
var items = await _portalRepository.AsSugarClient().Queryable<AuthorizeEntity>().Where(a => roleId.Contains(a.ObjectId)).Where(a => a.ItemType == "portal").GroupBy(it => new { it.ItemId }).Select(it => new { it.ItemId }).ToListAsync();
|
||||
if (items.Count == 0) return null;
|
||||
PortalEntity? entity = await _portalRepository.AsQueryable().Where(p => items.Select(it => it.ItemId).Contains(p.Id)).SingleAsync(p => p.Id == id && p.EnabledMark == 1 && p.DeleteMark == null);
|
||||
|
||||
Reference in New Issue
Block a user