Refactored all Policy strings into their own constant file.

This commit is contained in:
Joseph Milazzo 2020-12-24 10:21:59 -06:00
parent a40bc9e9f7
commit 793c13e1e6
4 changed files with 15 additions and 4 deletions

View file

@ -1,5 +1,6 @@
using System.Collections.Generic;
using System.Threading.Tasks;
using API.Constants;
using API.Entities;
using Microsoft.AspNetCore.Identity;
@ -11,8 +12,8 @@ namespace API.Data
{
var roles = new List<AppRole>
{
new AppRole {Name = "Admin"},
new AppRole {Name = "Pleb"}
new AppRole {Name = PolicyConstants.AdminRole},
new AppRole {Name = PolicyConstants.PlebRole}
};
foreach (var role in roles)