Granular permission back end done
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
using FJPSite.Data;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace FJPSite.Interfaces;
|
||||
|
||||
public interface IEntitySeederFactory
|
||||
{
|
||||
public void Seed(ApplicationDbContext context);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
using FJPSite.Enums;
|
||||
using FJPSite.Models;
|
||||
|
||||
namespace FJPSite.Interfaces;
|
||||
|
||||
public interface IPermissionService
|
||||
{
|
||||
Task<bool> UserHasPermissionAsync(string userId, FeatureEnum feature, ActionEnum action);
|
||||
/*Task<List<PermissionDto>> GetUserPermissionsAsync(string userId);
|
||||
Task<bool> RoleHasPermissionAsync(string roleId, FeatureEnum feature, ActionEnum action);
|
||||
Task AssignPermissionsToRoleAsync(string roleId, List<PermissionAssignmentDto> assignments);*/
|
||||
Task<List<PermissionStructureModel>> GetPermissionStructureAsync(int moduleId);
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
|
||||
namespace FJPSite.Interfaces;
|
||||
|
||||
public interface ISoftDeleteEntity
|
||||
{
|
||||
[Required, DefaultValue(true)]
|
||||
public bool IsActive { get; set; }
|
||||
}
|
||||
Reference in New Issue
Block a user