Sloved issues of permissions not been assigned when updating the subscription #144
@ -1069,7 +1069,7 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
// Get root employee and role for this tenant
|
// Get root employee and role for this tenant
|
||||||
var rootEmployee = await _context.Employees
|
var rootEmployee = await _context.Employees
|
||||||
.Include(e => e.ApplicationUser)
|
.Include(e => e.ApplicationUser)
|
||||||
.FirstOrDefaultAsync(e => e.ApplicationUser != null && (e.ApplicationUser.IsRootUser ?? false) && e.TenantId == model.TenantId);
|
.FirstOrDefaultAsync(e => e.ApplicationUser != null && (e.ApplicationUser.IsRootUser ?? false) && e.OrganizationId == tenant.OrganizationId);
|
||||||
|
|
||||||
if (rootEmployee == null)
|
if (rootEmployee == null)
|
||||||
{
|
{
|
||||||
@ -1363,7 +1363,7 @@ namespace Marco.Pms.Services.Controllers
|
|||||||
// 8c. Find root employee & role for this tenant.
|
// 8c. Find root employee & role for this tenant.
|
||||||
var rootEmployee = await context.Employees
|
var rootEmployee = await context.Employees
|
||||||
.Include(e => e.ApplicationUser)
|
.Include(e => e.ApplicationUser)
|
||||||
.FirstOrDefaultAsync(e => e.ApplicationUser != null && (e.ApplicationUser.IsRootUser ?? false) && e.TenantId == model.TenantId);
|
.FirstOrDefaultAsync(e => e.ApplicationUser != null && (e.ApplicationUser.IsRootUser ?? false) && e.OrganizationId == tenant.OrganizationId);
|
||||||
|
|
||||||
if (rootEmployee == null)
|
if (rootEmployee == null)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user