Dynamic User Roles
This commit is contained in:
18
Oqtane.Shared/Models/Role.cs
Normal file
18
Oqtane.Shared/Models/Role.cs
Normal file
@ -0,0 +1,18 @@
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
public class Role : IAuditable
|
||||
{
|
||||
public int RoleId { get; set; }
|
||||
public int SiteId { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Description { get; set; }
|
||||
public bool IsAutoAssigned { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
public DateTime CreatedOn { get; set; }
|
||||
public string ModifiedBy { get; set; }
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
}
|
||||
}
|
@ -7,11 +7,12 @@ namespace Oqtane.Models
|
||||
public int SiteUserId { get; set; }
|
||||
public int SiteId { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public bool IsAuthorized { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
public DateTime CreatedOn { get; set; }
|
||||
public string ModifiedBy { get; set; }
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
public User User { get; set; }
|
||||
}
|
||||
}
|
||||
|
@ -8,21 +8,23 @@ namespace Oqtane.Models
|
||||
public int UserId { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
public string Roles { get; set; }
|
||||
public bool IsSuperUser { get; set; }
|
||||
[NotMapped]
|
||||
public int SiteId { get; set; }
|
||||
[NotMapped]
|
||||
public string Roles { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
public DateTime CreatedOn { get; set; }
|
||||
public string ModifiedBy { get; set; }
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public int SiteId { get; set; }
|
||||
[NotMapped]
|
||||
public string Password { get; set; }
|
||||
[NotMapped]
|
||||
public bool IsAuthenticated { get; set; }
|
||||
[NotMapped]
|
||||
public bool IsPersistent { get; set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
20
Oqtane.Shared/Models/UserRole.cs
Normal file
20
Oqtane.Shared/Models/UserRole.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
public class UserRole : IAuditable
|
||||
{
|
||||
public int UserRoleId { get; set; }
|
||||
public int UserId { get; set; }
|
||||
public int RoleId { get; set; }
|
||||
public DateTime? EffectiveDate { get; set; }
|
||||
public DateTime? ExpiryDate { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
public DateTime CreatedOn { get; set; }
|
||||
public string ModifiedBy { get; set; }
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
public Role Role { get; set; }
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user