Пример #1
0
        public async Task <EnvironmentModel> Get()
        {
            var userId = ((ClaimsPrincipal)User).Claims.SingleOrDefault(c => c.Type == ClaimTypes.NameIdentifier)?.Value;
            var user   = await _systemUserService.Get(Guid.Parse(userId));

            return(new EnvironmentModel
            {
                UserName = user.FirstName + " " + user.LastName,
                Roles = user.Roles
            });
        }
Пример #2
0
        public async Task <User> Get(Guid id)
        {
            var systemUser = await _systemUserService.Get(id);

            return(_userMapper.Map(systemUser));
        }