Created AdminContext handling
This commit is contained in:
@@ -1,8 +1,11 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Text.Json.Serialization;
|
||||
using HopFrame.Web.Admin.Attributes;
|
||||
using HopFrame.Web.Admin.Attributes.Members;
|
||||
|
||||
namespace HopFrame.Database.Models;
|
||||
|
||||
[AdminDescription("On this page you can manage all user accounts.")]
|
||||
public class User : IPermissionOwner {
|
||||
|
||||
[Key, Required, MinLength(36), MaxLength(36)]
|
||||
@@ -14,15 +17,16 @@ public class User : IPermissionOwner {
|
||||
[Required, MaxLength(50), EmailAddress]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required, MinLength(8), MaxLength(255), JsonIgnore]
|
||||
[Required, MinLength(8), MaxLength(255), JsonIgnore, AdminIgnore(onlyForListing: true), AdminHideValue]
|
||||
public string Password { get; set; }
|
||||
|
||||
[Required]
|
||||
[Required, AdminUneditable]
|
||||
public DateTime CreatedAt { get; set; }
|
||||
|
||||
[AdminIgnore(onlyForListing: true)]
|
||||
public virtual IList<Permission> Permissions { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
[JsonIgnore, AdminIgnore]
|
||||
public virtual IList<Token> Tokens { get; set; }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user