mirror of
https://github.com/Kareadita/Kavita.git
synced 2026-05-28 10:32:34 -04:00
Refractor token auth stuff to use identiycore framework
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
using API.Entities;
|
||||
using Microsoft.AspNetCore.Identity;
|
||||
|
||||
namespace API.Data
|
||||
{
|
||||
public class Seed
|
||||
{
|
||||
public static async Task SeedRoles(RoleManager<AppRole> roleManager)
|
||||
{
|
||||
var roles = new List<AppRole>
|
||||
{
|
||||
new AppRole {Name = "Admin"},
|
||||
new AppRole {Name = "Pleb"}
|
||||
};
|
||||
|
||||
foreach (var role in roles)
|
||||
{
|
||||
await roleManager.CreateAsync(role);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user