2023-09-15 12:37:02 +03:30
|
|
|
|
using System.Security.Claims;
|
|
|
|
|
|
|
|
|
|
|
|
namespace Brizco.Common.Models.Claims;
|
2023-09-08 12:25:21 +03:30
|
|
|
|
public static class ApplicationClaims
|
|
|
|
|
|
{
|
2023-09-20 11:54:12 +03:30
|
|
|
|
public static ClaimDto ManageComplexes { get; } = new ClaimDto
|
2023-09-15 12:37:02 +03:30
|
|
|
|
{
|
|
|
|
|
|
Type = CustomClaimType.Permission,
|
2023-09-20 11:54:12 +03:30
|
|
|
|
Value = ApplicationPermission.ManageComplexes,
|
|
|
|
|
|
Title = "دسترسی کامل به مجموعه ها",
|
|
|
|
|
|
Detail = "دسترسی به افزودن و مدیریت مجموعه های سیستم"
|
|
|
|
|
|
};
|
|
|
|
|
|
public static ClaimDto ViewComplexes { get; } = new ClaimDto
|
|
|
|
|
|
{
|
|
|
|
|
|
Type = CustomClaimType.Permission,
|
|
|
|
|
|
Value = ApplicationPermission.ViewComplexes,
|
|
|
|
|
|
Title = "مشاهده مجموعه ها",
|
|
|
|
|
|
Detail = "دسترسی به مشاهده مجموعه ها"
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2023-11-13 14:42:49 +03:30
|
|
|
|
public static ClaimDto ManageStaffs { get; } = new ClaimDto
|
|
|
|
|
|
{
|
|
|
|
|
|
Type = CustomClaimType.Permission,
|
|
|
|
|
|
Value = ApplicationPermission.ManageStaffs,
|
|
|
|
|
|
Title = "دسترسی کامل به کارکنان",
|
|
|
|
|
|
Detail = "دسترسی به افزودن و مدیریت کارکنان مجموعه"
|
|
|
|
|
|
};
|
|
|
|
|
|
public static ClaimDto ViewStaffs { get; } = new ClaimDto
|
|
|
|
|
|
{
|
|
|
|
|
|
Type = CustomClaimType.Permission,
|
|
|
|
|
|
Value = ApplicationPermission.ViewStaffs,
|
|
|
|
|
|
Title = "مشاهده کارکنان",
|
|
|
|
|
|
Detail = "دسترسی به مشاهده کارکنان مجموعه"
|
|
|
|
|
|
};
|
|
|
|
|
|
|
2023-09-20 11:54:12 +03:30
|
|
|
|
public static ClaimDto ManageShifts { get; } = new ClaimDto
|
|
|
|
|
|
{
|
|
|
|
|
|
Type = CustomClaimType.Permission,
|
|
|
|
|
|
Value = ApplicationPermission.ManageShifts,
|
|
|
|
|
|
Title = "دسترسی کامل به شیفت ها",
|
|
|
|
|
|
Detail = "دسترسی به افزودن و مدیریت شیفت ها فروشگاه شما"
|
|
|
|
|
|
};
|
|
|
|
|
|
public static ClaimDto ViewShifts { get; } = new ClaimDto
|
|
|
|
|
|
{
|
|
|
|
|
|
Type = CustomClaimType.Permission,
|
|
|
|
|
|
Value = ApplicationPermission.ViewShifts,
|
|
|
|
|
|
Title = "دسترسی مشاهده به شیفت ها",
|
|
|
|
|
|
Detail = "قابلیت مشاهده شیفت های مجموعه"
|
|
|
|
|
|
};
|
|
|
|
|
|
public static ClaimDto ManageShiftPlans { get; } = new ClaimDto
|
|
|
|
|
|
{
|
|
|
|
|
|
Type = CustomClaimType.Permission,
|
|
|
|
|
|
Value = ApplicationPermission.ManageShiftPlans,
|
|
|
|
|
|
Title = "دسترسی کامل به شیفت بندی ها",
|
|
|
|
|
|
Detail = "دسترسی به افزودن و مدیریت شیفت بندی فروشگاه شما"
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
public static ClaimDto ManageTasks { get; } = new ClaimDto
|
|
|
|
|
|
{
|
|
|
|
|
|
Type = CustomClaimType.Permission,
|
|
|
|
|
|
Value = ApplicationPermission.ManageTasks,
|
|
|
|
|
|
Title = "دسترسی کامل به وظایف",
|
|
|
|
|
|
Detail = "دسترسی به افزودن و مدیریت وظایف فروشگاه شما"
|
|
|
|
|
|
};
|
|
|
|
|
|
public static ClaimDto ViewTasks { get; } = new ClaimDto
|
|
|
|
|
|
{
|
|
|
|
|
|
Type = CustomClaimType.Permission,
|
|
|
|
|
|
Value = ApplicationPermission.ViewTasks,
|
|
|
|
|
|
Title = "دسترسی مشاهده وظایف",
|
|
|
|
|
|
Detail = "دسترسی مشاهده وظایف مجموعه شما"
|
|
|
|
|
|
};
|
|
|
|
|
|
public static ClaimDto ManageActivities { get; } = new ClaimDto
|
|
|
|
|
|
{
|
|
|
|
|
|
Type = CustomClaimType.Permission,
|
|
|
|
|
|
Value = ApplicationPermission.ManageActivities,
|
|
|
|
|
|
Title = "دسترسی کامل به فعالیت ها",
|
|
|
|
|
|
Detail = "دسترسی به افزودن و مدیریت فعالیت ها فروشگاه شما"
|
2023-09-15 12:37:02 +03:30
|
|
|
|
};
|
|
|
|
|
|
|
2023-10-18 17:19:56 +03:30
|
|
|
|
public static List<ClaimDto> AllClaimDtos = new List<ClaimDto>
|
|
|
|
|
|
{
|
|
|
|
|
|
ManageActivities,
|
|
|
|
|
|
ViewTasks,
|
|
|
|
|
|
ManageTasks,
|
|
|
|
|
|
|
|
|
|
|
|
ManageShiftPlans,
|
|
|
|
|
|
ViewShifts,
|
|
|
|
|
|
ManageShifts,
|
|
|
|
|
|
|
|
|
|
|
|
ViewComplexes,
|
|
|
|
|
|
ManageComplexes,
|
|
|
|
|
|
};
|
2023-09-15 12:37:02 +03:30
|
|
|
|
|
|
|
|
|
|
public static List<Claim> AllClaims = new List<Claim>
|
|
|
|
|
|
{
|
2023-11-13 14:42:49 +03:30
|
|
|
|
ManageStaffs.GetClaim,
|
|
|
|
|
|
ViewStaffs.GetClaim,
|
|
|
|
|
|
|
2023-09-20 11:54:12 +03:30
|
|
|
|
ManageActivities.GetClaim,
|
|
|
|
|
|
ViewTasks.GetClaim,
|
|
|
|
|
|
ManageTasks.GetClaim,
|
|
|
|
|
|
|
|
|
|
|
|
ManageShiftPlans.GetClaim,
|
|
|
|
|
|
ViewShifts.GetClaim,
|
|
|
|
|
|
ManageShifts.GetClaim,
|
|
|
|
|
|
|
|
|
|
|
|
ViewComplexes.GetClaim,
|
|
|
|
|
|
ManageComplexes.GetClaim,
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
public static List<Claim> ManagerClaims = new List<Claim>
|
|
|
|
|
|
{
|
2023-11-13 14:42:49 +03:30
|
|
|
|
ManageStaffs.GetClaim,
|
|
|
|
|
|
ViewStaffs.GetClaim,
|
|
|
|
|
|
|
2023-09-20 11:54:12 +03:30
|
|
|
|
ManageActivities.GetClaim,
|
|
|
|
|
|
ViewTasks.GetClaim,
|
|
|
|
|
|
ManageTasks.GetClaim,
|
|
|
|
|
|
|
|
|
|
|
|
ManageShiftPlans.GetClaim,
|
|
|
|
|
|
ViewShifts.GetClaim,
|
|
|
|
|
|
ManageShifts.GetClaim,
|
2023-09-15 12:37:02 +03:30
|
|
|
|
};
|
2023-11-13 14:42:49 +03:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static List<Claim> SuperVisorClaims = new List<Claim>
|
|
|
|
|
|
{
|
|
|
|
|
|
ManageActivities.GetClaim,
|
|
|
|
|
|
ViewTasks.GetClaim,
|
|
|
|
|
|
ManageTasks.GetClaim,
|
|
|
|
|
|
|
|
|
|
|
|
ManageShiftPlans.GetClaim,
|
|
|
|
|
|
ViewShifts.GetClaim,
|
|
|
|
|
|
ManageShifts.GetClaim,
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
public static List<Claim> StaffClaims = new List<Claim>
|
|
|
|
|
|
{
|
|
|
|
|
|
ManageActivities.GetClaim,
|
|
|
|
|
|
ViewTasks.GetClaim,
|
|
|
|
|
|
};
|
2023-09-08 12:25:21 +03:30
|
|
|
|
}
|