state after adding all of the user stuff and messing around with the wierd brave bug

This commit is contained in:
2026-03-08 14:45:38 -04:00
commit dde9ffcedb
4283 changed files with 124077 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
namespace OpenArchival.Blazor.AdminPages.Shared;
using OpenArchival.DataAccess;
public class UserDto
{
public string Id { get; set; } = "";
public string? Username { get; set; }
public IEnumerable<string> Roles { get; set; } = new HashSet<string>();
public string? Password { get; set; }
public string RolesDisplay { get => string.Join(",", Roles); }
public static ApplicationUser ToApplicationUser(UserDto user)
{
var newUser = new ApplicationUser
{
UserName = user.Username,
Email = user.Username
};
if (!string.IsNullOrEmpty(user.Id))
{
newUser.Id = user.Id;
}
return newUser;
}
}