fix permission table
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 4s
All checks were successful
Build and Deploy API / build-and-deploy (push) Successful in 4s
This commit is contained in:
@@ -14,4 +14,12 @@ public class AppDbContext : IdentityDbContext<User> {
|
||||
public DbSet<Item> Items { get; set; }
|
||||
public DbSet<RefreshToken> RefreshTokens { get; set; }
|
||||
|
||||
protected override void OnModelCreating(ModelBuilder builder) {
|
||||
|
||||
base.OnModelCreating(builder);
|
||||
|
||||
builder.Entity<User>().Property(u => u.Permissions).HasColumnType("jsonb");
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@@ -7,7 +7,10 @@ public class User : IdentityUser {
|
||||
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
public List<string>? Permissions { get; set; }
|
||||
// TODO: make this a list of UserPermissions
|
||||
// where a userpermission has an Id, Permission (string), and userId string
|
||||
// then we can do something like: get all users with this permission
|
||||
public List<string>? Permissions { get; set; } = new();
|
||||
|
||||
// properties inherited from IdentityUser:
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user