Exemplo n.º 1
0
        /// <summary>
        /// 获取操作列表
        /// </summary>
        /// <param name="moduleId">模块标识</param>
        public async Task <List <Operation> > GetOperationsAsync(Guid moduleId)
        {
            var pos = await _store.FindAllAsync(x => x.ParentId == moduleId && x.Type == ResourceType.Operation);

            return(pos.Select(ToEntity).ToList());
        }
Exemplo n.º 2
0
        /// <summary>
        /// 获取已启用的身份资源列表
        /// </summary>
        public async Task <List <IdentityResource> > GetEnabledResources()
        {
            var list = await _store.FindAllAsync(t => t.Type == ResourceType.Identity && t.Enabled);

            return(list.Select(ToEntity).ToList());
        }