public async Task <OperationDataResult <NavigationMenuModel> > GetCurrentNavigationMenu()
        {
            try
            {
                var menuItems = await _dbContext.MenuItems
                                .Include(x => x.MenuTemplate)
                                .ThenInclude(x => x.EformPlugin)
                                .ToListAsync();

                var userClaims = await _claimsService.GetUserClaimsNames(_userService.UserId);

                if (!_userService.IsInRole(EformRole.Admin))
                {
                    menuItems = FilterMenuForUser(menuItems, userClaims);
                }

                //var user = await _userService.GetCurrentUserAsync();

                var menuTemplates = new List <NavigationMenuTemplateModel>()
                {
                    new NavigationMenuTemplateModel
                    {
                        Id    = 1,
                        Name  = "Main application",
                        Items = _dbContext.MenuTemplates
                                .Where(x => x.EformPluginId == null && !string.IsNullOrEmpty(x.DefaultLink))
                                .Select(p => new NavigationMenuTemplateItemModel
                        {
                            Id           = p.Id,
                            Name         = p.Name,
                            E2EId        = p.E2EId,
                            Link         = p.DefaultLink,
                            Translations = _dbContext.MenuTemplateTranslations
                                           .Where(x => x.MenuTemplateId == p.Id)
                                           .Select(e => new NavigationMenuTranslationModel
                            {
                                Id         = e.Id,
                                Name       = e.Name,
                                LocaleName = e.LocaleName,
                                Language   = e.Language,
                            })
                                           .ToList(),
                            RelatedTemplateItemId = 1
                        })
                                .ToList()
                    }
                };

                var enablePlugins = await _dbContext.EformPlugins
                                    .Where(x => x.Status == (int)PluginStatus.Enabled)
                                    .ToListAsync();

                if (enablePlugins.Any())
                {
                    menuTemplates.AddRange(enablePlugins.Select(x => new NavigationMenuTemplateModel()
                    {
                        Id    = x.Id,
                        Name  = Program.EnabledPlugins.Single(p => p.PluginId == x.PluginId).Name,// changed plugin
                        Items = _dbContext.MenuTemplates
                                .Where(p => p.EformPluginId == x.Id && !string.IsNullOrEmpty(p.DefaultLink))
                                .Select(p => new NavigationMenuTemplateItemModel
                        {
                            Id           = p.Id,
                            Name         = p.Name,
                            E2EId        = p.E2EId,
                            Link         = p.DefaultLink,
                            Translations = _dbContext.MenuTemplateTranslations
                                           .Where(y => y.MenuTemplateId == p.Id)
                                           .Select(e => new NavigationMenuTranslationModel
                            {
                                Id         = e.Id,
                                Name       = e.Name,
                                LocaleName = e.LocaleName,
                                Language   = e.Language,
                            })
                                           .ToList(),
                            RelatedTemplateItemId = p.Id
                        })
                                .ToList()
                    }));
                }

                var securityGroupsIds = await _dbContext.MenuItemSecurityGroups
                                        .ToListAsync();

                var actualMenu = menuItems
                                 .Where(x => x.ParentId == null)
                                 .OrderBy(x => x.Position)
                                 .Select(x => new NavigationMenuItemModel
                {
                    Id    = x.Id,
                    E2EId = x.E2EId,
                    Name  = x.Name,
                    Type  = x.Type,
                    Link  = x.Link,
                    RelatedTemplateItemId = x.MenuTemplateId,
                    ParentId       = x.ParentId,
                    Position       = x.Position,
                    IsInternalLink = x.IsInternalLink,
                    Translations   = _dbContext.MenuItemTranslations
                                     .Where(p => p.MenuItemId == x.Id)
                                     .Select(p => new NavigationMenuTranslationModel
                    {
                        Id         = p.Id,
                        Name       = p.Name,
                        LocaleName = p.LocaleName,
                        Language   = p.Language,
                    })
                                     .ToList(),
                    SecurityGroupsIds = securityGroupsIds
                                        .Where(p => p.MenuItemId == x.Id).Select(j => j.SecurityGroupId)
                                        .ToList(),
                    Children = menuItems.Where(p => p.ParentId == x.Id)
                               .OrderBy(p => p.Position)
                               .Select(p => new NavigationMenuItemModel
                    {
                        Id    = p.Id,
                        E2EId = x.E2EId,
                        Name  = p.Name,
                        Type  = p.Type,
                        Link  = p.Link,
                        RelatedTemplateItemId = p.MenuTemplateId,
                        ParentId     = p.ParentId,
                        Position     = p.Position,
                        Translations = _dbContext.MenuItemTranslations
                                       .Where(k => k.MenuItemId == p.Id)
                                       .Select(k => new NavigationMenuTranslationModel
                        {
                            Id         = k.Id,
                            Name       = k.Name,
                            LocaleName = k.LocaleName,
                            Language   = k.Language,
                        })
                                       .ToList(),
                        SecurityGroupsIds = _dbContext.MenuItemSecurityGroups
                                            .Where(k => k.MenuItemId == p.Id)
                                            .Select(k => k.SecurityGroupId)
                                            .ToList(),
                        IsInternalLink = p.IsInternalLink,
                    })
                               .ToList(),
                })
                                 .ToList();

                var result = new NavigationMenuModel()
                {
                    MenuTemplates = menuTemplates,
                    ActualMenu    = actualMenu,
                };

                return(new OperationDataResult <NavigationMenuModel>(true, result));
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                _logger.LogError(e.Message);
                return(new OperationDataResult <NavigationMenuModel>(false,
                                                                     _localizationService.GetString("ErrorWhileObtainingUserMenu")));
            }
        }