Files
Samuele Locatelli 7f8d21976f Update roles!
2023-05-31 08:36:56 +02:00

33 lines
1.2 KiB
C#

using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore.Metadata.Builders;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace WebDoorCreator.Data
{
public class RoleConfiguration : IEntityTypeConfiguration<IdentityRole>
{
#region Public Methods
public void Configure(EntityTypeBuilder<IdentityRole> builder)
{
builder.HasData(
new IdentityRole { Name = "Undef", NormalizedName = "UNDEF" },
new IdentityRole { Name = "SuperAdmin", NormalizedName = "SUPERADMIN" },
new IdentityRole { Name = "DcaAdmin", NormalizedName = "DCAADMIN" },
new IdentityRole { Name = "DcaOrdMan", NormalizedName = "DCAORDMAN" },
new IdentityRole { Name = "DcaProj", NormalizedName = "DCAPROJ" },
new IdentityRole { Name = "CompAdmin", NormalizedName = "COMPADMIN" },
new IdentityRole { Name = "CompUser", NormalizedName = "COMPUSER" },
new IdentityRole { Name = "User", NormalizedName = "USER" }
);
}
#endregion Public Methods
}
}