Esempio n. 1
0
        public async Task <MenuAuthoritiesResult> GetItemsAsync(string SessionKey, int?CompanyId, int?LoginUserId)
        {
            return(await authorizationProcessor.DoAuthorizeAsync(SessionKey, async token =>
            {
                var result = (await menuAuthorityProcessor.GetAsync(new MenuAuthoritySearch {
                    CompanyId = CompanyId,
                    LoginUserId = LoginUserId,
                }, token)).ToList();

                return new MenuAuthoritiesResult
                {
                    ProcessResult = new ProcessResult {
                        Result = true
                    },
                    MenuAuthorities = result,
                };
            }, logger));
        }
Esempio n. 2
0
 public async Task <ActionResult <IEnumerable <MenuAuthority> > > GetItems(MenuAuthoritySearch option, CancellationToken token)
 => (await menuAuthorityProcessor.GetAsync(option, token)).ToArray();