public IEnumerable <Permission> GetPermissions()
        {
            var permissions = new List <Permission>();

            permissions.Add(ManageAll);
            // dynamic permissions
            var menuParts = _dynamicProjectionService.GetPartsForMenu();

            foreach (var menuPart in menuParts)
            {
                var newpermission = CreateDynamicPermission(menuPart);
                permissions.Add(newpermission);
            }

            return(permissions);
        }
        public void GetNavigation(NavigationBuilder builder)
        {
            var allParts = _dynamicProjectionService.GetPartsForMenu();

            foreach (var part in allParts)
            {
                if (part != null)
                {
                    builder.Add(
                        new LocalizedString(part.AdminMenuText),
                        part.AdminMenuPosition,
                        item => item.Action(
                            "List",
                            "DynamicProjectionDisplay",
                            new { area = "Laser.Orchard.ContentExtension", contentid = part.Id })
                        .Permission(Permissions.DynamicProjectionPermission.CreateDynamicPermission(part))
                        .AddImageSet(part.Icon));
                }
            }
        }