This commit is contained in:
@@ -52,10 +52,31 @@ namespace AyaNova.Biz
|
||||
return await ct.PartWarehouse.AnyAsync(z => z.Id == id);
|
||||
case AyaType.PartAssembly:
|
||||
return await ct.PartAssembly.AnyAsync(z => z.Id == id);
|
||||
|
||||
//--- PM
|
||||
case AyaType.PM:
|
||||
return await ct.PM.AnyAsync(z => z.Id == id);
|
||||
case AyaType.PMItem:
|
||||
return await ct.PMItem.AnyAsync(z => z.Id == id);
|
||||
case AyaType.PMItemExpense:
|
||||
return await ct.PMItemExpense.AnyAsync(z => z.Id == id);
|
||||
case AyaType.PMItemLabor:
|
||||
return await ct.PMItemLabor.AnyAsync(z => z.Id == id);
|
||||
case AyaType.PMItemLoan:
|
||||
return await ct.PMItemLoan.AnyAsync(z => z.Id == id);
|
||||
case AyaType.PMItemPart:
|
||||
return await ct.PMItemPart.AnyAsync(z => z.Id == id);
|
||||
case AyaType.PMItemScheduledUser:
|
||||
return await ct.PMItemScheduledUser.AnyAsync(z => z.Id == id);
|
||||
case AyaType.PMItemTask:
|
||||
return await ct.PMItemTask.AnyAsync(z => z.Id == id);
|
||||
case AyaType.PMItemTravel:
|
||||
return await ct.PMItemTravel.AnyAsync(z => z.Id == id);
|
||||
case AyaType.PMItemUnit:
|
||||
return await ct.PMItemUnit.AnyAsync(z => z.Id == id);
|
||||
case AyaType.PMItemOutsideService:
|
||||
return await ct.PMItemOutsideService.AnyAsync(z => z.Id == id);
|
||||
//---
|
||||
|
||||
case AyaType.Project:
|
||||
return await ct.Project.AnyAsync(z => z.Id == id);
|
||||
|
||||
@@ -578,6 +578,30 @@ namespace AyaNova.Biz
|
||||
//---
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
//PM
|
||||
//
|
||||
|
||||
var pmBizRoleSet = new BizRoleSet()
|
||||
{
|
||||
Change = AuthorizationRoles.BizAdmin | AuthorizationRoles.Service,
|
||||
ReadFullRecord = AuthorizationRoles.BizAdminRestricted | AuthorizationRoles.ServiceRestricted | AuthorizationRoles.SalesRestricted,
|
||||
Select = AuthorizationRoles.All
|
||||
};
|
||||
|
||||
roles.Add(AyaType.PM, pmBizRoleSet);
|
||||
roles.Add(AyaType.PMItem, pmBizRoleSet);
|
||||
roles.Add(AyaType.PMItemExpense, pmBizRoleSet);
|
||||
roles.Add(AyaType.PMItemLabor, pmBizRoleSet);
|
||||
roles.Add(AyaType.PMItemLoan, pmBizRoleSet);
|
||||
roles.Add(AyaType.PMItemPart, pmBizRoleSet);
|
||||
roles.Add(AyaType.PMItemScheduledUser, pmBizRoleSet);
|
||||
roles.Add(AyaType.PMItemTask, pmBizRoleSet);
|
||||
roles.Add(AyaType.PMItemTravel, pmBizRoleSet);
|
||||
roles.Add(AyaType.PMItemUnit, pmBizRoleSet);
|
||||
roles.Add(AyaType.PMItemOutsideService, pmBizRoleSet);
|
||||
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
//GLOBAL BIZ SETTINGS
|
||||
@@ -866,9 +890,9 @@ namespace AyaNova.Biz
|
||||
|
||||
//GENERATE CLIENT COMPATIBLE JSON FROM ROLES OUTPUT TO DEBUG LOG
|
||||
//And seperately, set the JSON variable so can copy from debug variable "value" property for lastRoles here to compare
|
||||
// string json = Newtonsoft.Json.JsonConvert.SerializeObject(roles, Newtonsoft.Json.Formatting.None);
|
||||
// System.Diagnostics.Debugger.Log(1, "JSONFRAGMENTFORCLIENT", "BizRoles.cs -> biz-role-rights.js Client roles JSON fragment:\n\n");
|
||||
// System.Diagnostics.Debugger.Log(1, "JSONFRAGMENTFORCLIENT", json + "\n\n");
|
||||
string json = Newtonsoft.Json.JsonConvert.SerializeObject(roles, Newtonsoft.Json.Formatting.None);
|
||||
System.Diagnostics.Debugger.Log(1, "JSONFRAGMENTFORCLIENT", "BizRoles.cs -> biz-role-rights.js Client roles JSON fragment:\n\n");
|
||||
System.Diagnostics.Debugger.Log(1, "JSONFRAGMENTFORCLIENT", json + "\n\n");
|
||||
|
||||
//ONGOING VALIDATION TO CATCH MISMATCH WHEN NEW ROLES ADDED (wont' catch changes to existing unfortunately)
|
||||
|
||||
|
||||
@@ -52,14 +52,9 @@ namespace AyaNova.Models
|
||||
public virtual DbSet<PartSerial> PartSerial { get; set; }
|
||||
public virtual DbSet<PartAssembly> PartAssembly { get; set; }
|
||||
public virtual DbSet<PartAssemblyItem> PartAssemblyItem { get; set; }
|
||||
public virtual DbSet<PM> PM { get; set; }
|
||||
public virtual DbSet<PMItem> PMItem { get; set; }
|
||||
|
||||
public virtual DbSet<Project> Project { get; set; }
|
||||
public virtual DbSet<PurchaseOrder> PurchaseOrder { get; set; }
|
||||
public virtual DbSet<PurchaseOrderItem> PurchaseOrderItem { get; set; }
|
||||
|
||||
|
||||
public virtual DbSet<Unit> Unit { get; set; }
|
||||
public virtual DbSet<UnitModel> UnitModel { get; set; }
|
||||
public virtual DbSet<Vendor> Vendor { get; set; }
|
||||
@@ -103,15 +98,27 @@ namespace AyaNova.Models
|
||||
public virtual DbSet<QuoteItemUnit> QuoteItemUnit { get; set; }
|
||||
public virtual DbSet<QuoteItemOutsideService> QuoteItemOutsideService { get; set; }
|
||||
public virtual DbSet<QuoteStatus> QuoteStatus { get; set; }
|
||||
|
||||
|
||||
|
||||
|
||||
//PM
|
||||
public virtual DbSet<PM> PM { get; set; }
|
||||
public virtual DbSet<PMItem> PMItem { get; set; }
|
||||
public virtual DbSet<PMItemExpense> PMItemExpense { get; set; }
|
||||
public virtual DbSet<PMItemLabor> PMItemLabor { get; set; }
|
||||
public virtual DbSet<PMItemLoan> PMItemLoan { get; set; }
|
||||
public virtual DbSet<PMItemPart> PMItemPart { get; set; }
|
||||
public virtual DbSet<PMItemScheduledUser> PMItemScheduledUser { get; set; }
|
||||
public virtual DbSet<PMItemTask> PMItemTask { get; set; }
|
||||
public virtual DbSet<PMItemTravel> PMItemTravel { get; set; }
|
||||
public virtual DbSet<PMItemUnit> PMItemUnit { get; set; }
|
||||
public virtual DbSet<PMItemOutsideService> PMItemOutsideService { get; set; }
|
||||
|
||||
|
||||
|
||||
public virtual DbSet<Logo> Logo { get; set; }
|
||||
public virtual DbSet<Report> Report { get; set; }
|
||||
public virtual DbSet<DashboardView> DashboardView { get; set; }
|
||||
// public virtual DbSet<ServiceBank> ServiceBank { get; set; }
|
||||
// public virtual DbSet<ServiceBank> ServiceBank { get; set; }
|
||||
|
||||
public virtual DbSet<ViewRestockRequired> ViewRestockRequired { get; set; }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user