Permission-based authorization utilizing Policies
This commit is contained in:
@ -9,14 +9,15 @@ namespace Oqtane.Models
|
||||
public int ModuleId { get; set; }
|
||||
public int SiteId { get; set; }
|
||||
public string ModuleDefinitionName { get; set; }
|
||||
public string ViewPermissions { get; set; }
|
||||
public string EditPermissions { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
public DateTime CreatedOn { get; set; }
|
||||
public string ModifiedBy { get; set; }
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string Permissions { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public int PageModuleId { get; set; }
|
||||
[NotMapped]
|
||||
|
@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
@ -14,13 +15,15 @@ namespace Oqtane.Models
|
||||
public string LayoutType { get; set; }
|
||||
public string Icon { get; set; }
|
||||
public string Panes { get; set; }
|
||||
public string ViewPermissions { get; set; }
|
||||
public string EditPermissions { get; set; }
|
||||
public bool IsNavigation { get; set; }
|
||||
|
||||
public string CreatedBy { get; set; }
|
||||
public DateTime CreatedOn { get; set; }
|
||||
public string ModifiedBy { get; set; }
|
||||
public DateTime ModifiedOn { get; set; }
|
||||
|
||||
|
||||
[NotMapped]
|
||||
public string Permissions { get; set; }
|
||||
}
|
||||
}
|
||||
|
23
Oqtane.Shared/Models/Permission.cs
Normal file
23
Oqtane.Shared/Models/Permission.cs
Normal file
@ -0,0 +1,23 @@
|
||||
using System;
|
||||
|
||||
namespace Oqtane.Models
|
||||
{
|
||||
public class Permission : IAuditable
|
||||
{
|
||||
public int PermissionId { get; set; }
|
||||
public int SiteId { get; set; }
|
||||
public string EntityName { get; set; }
|
||||
public int EntityId { get; set; }
|
||||
public string PermissionName { get; set; }
|
||||
public int? RoleId { 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 Role Role { get; set; }
|
||||
}
|
||||
}
|
@ -8,7 +8,8 @@ namespace Oqtane.Models
|
||||
public int UserId { get; set; }
|
||||
public string Username { get; set; }
|
||||
public string DisplayName { get; set; }
|
||||
public bool IsSuperUser { get; set; }
|
||||
public string Email { get; set; }
|
||||
public bool IsHost { get; set; }
|
||||
[NotMapped]
|
||||
public int SiteId { get; set; }
|
||||
[NotMapped]
|
||||
|
Reference in New Issue
Block a user