Add UserList

This commit is contained in:
2023-01-27 09:36:14 -05:00
parent 4e3daa7320
commit 8e16510ad9
4 changed files with 39 additions and 1 deletions
+16 -1
View File
@@ -1,4 +1,6 @@
using System.Web.Mvc;
using System;
using System.Linq;
using System.Web.Mvc;
using System.Web.Security;
using Hangfire;
using LeafWeb.WebCms.Models;
@@ -6,6 +8,7 @@ using LeafWeb.WebCms.Services;
using log4net;
using MlkPwgen;
using Umbraco.Core;
using Umbraco.Web.Mvc;
namespace LeafWeb.WebCms.Controllers
{
@@ -208,5 +211,17 @@ namespace LeafWeb.WebCms.Controllers
return Redirect(redirectUrl);
}
[MemberAuthorize(AllowGroup = "Administrator")]
public ActionResult UserList()
{
var emails
= from li in DataService.GetLeafInputs()
group li by li.Email
into emailGroup
select new { emailGroup.Key, emailGroup.FirstOrDefault().Name };
return View(emails.ToList().Select(e => new Tuple<string, string>(e.Name, e.Key)));
}
}
}