Adding permissions during startup
This commit is contained in:
9
MainProject/Models/Common/OperationInfo.cs
Normal file
9
MainProject/Models/Common/OperationInfo.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace BasicDotnetTemplate.MainProject.Models.Common;
|
||||
|
||||
public class OperationInfo
|
||||
{
|
||||
#nullable enable
|
||||
public string? Operation { get; set; }
|
||||
public List<string>? Roles {get; set; }
|
||||
#nullable disable
|
||||
}
|
||||
9
MainProject/Models/Common/PermissionInfo.cs
Normal file
9
MainProject/Models/Common/PermissionInfo.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
namespace BasicDotnetTemplate.MainProject.Models.Common;
|
||||
|
||||
public class PermissionInfo
|
||||
{
|
||||
#nullable enable
|
||||
public string? System { get; set; }
|
||||
public List<RolePermissionModuleOperation>? RolePermissionModuleOperations {get; set; }
|
||||
#nullable disable
|
||||
}
|
||||
8
MainProject/Models/Common/PermissionsFile.cs
Normal file
8
MainProject/Models/Common/PermissionsFile.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace BasicDotnetTemplate.MainProject.Models.Common;
|
||||
|
||||
public class PermissionsFile
|
||||
{
|
||||
#nullable enable
|
||||
public List<PermissionInfo>? PermissionInfos { get; set; }
|
||||
#nullable disable
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace BasicDotnetTemplate.MainProject.Models.Common;
|
||||
|
||||
public class RolePermissionModuleOperation
|
||||
{
|
||||
#nullable enable
|
||||
public string? Module { get; set; }
|
||||
public List<OperationInfo>? Operations { get; set; }
|
||||
#nullable disable
|
||||
}
|
||||
@@ -9,6 +9,6 @@ public class AppSettings
|
||||
public DatabaseSettings? DatabaseSettings { get; set; }
|
||||
public JwtSettings? JwtSettings { get; set; }
|
||||
public EncryptionSettings? EncryptionSettings { get; set; }
|
||||
|
||||
public PermissionsSettings? PermissionsSettings { get; set; }
|
||||
#nullable disable
|
||||
}
|
||||
8
MainProject/Models/Settings/PermissionsSettings.cs
Normal file
8
MainProject/Models/Settings/PermissionsSettings.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace BasicDotnetTemplate.MainProject.Models.Settings;
|
||||
|
||||
public class PermissionsSettings
|
||||
{
|
||||
#nullable enable
|
||||
public string? FilePath { get; set; }
|
||||
#nullable disable
|
||||
}
|
||||
Reference in New Issue
Block a user