case 1690

This commit is contained in:
2021-11-24 23:04:12 +00:00
parent 492430bb8c
commit fcfd09a909
2 changed files with 3 additions and 5 deletions

2
.vscode/launch.json vendored
View File

@@ -55,7 +55,7 @@
"AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles", "AYANOVA_FOLDER_USER_FILES": "c:\\temp\\RavenTestData\\userfiles",
"AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles", "AYANOVA_FOLDER_BACKUP_FILES": "c:\\temp\\RavenTestData\\backupfiles",
"AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles", "AYANOVA_FOLDER_TEMPORARY_SERVER_FILES": "c:\\temp\\RavenTestData\\tempfiles",
"AYANOVA_SERVER_TEST_MODE": "true", "AYANOVA_SERVER_TEST_MODE": "false",
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small", "AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-8", "AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-8",
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin\\" "AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin\\"

View File

@@ -75,10 +75,8 @@ namespace AyaNova.Api.Controllers
return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason)); return StatusCode(503, new ApiErrorResponse(serverState.ApiErrorCode, null, serverState.Reason));
UnitBiz biz = UnitBiz.GetBiz(ct, HttpContext); UnitBiz biz = UnitBiz.GetBiz(ct, HttpContext);
var customerEffectiveRights = await UserBiz.CustomerUserEffectiveRightsAsync(biz.UserId); var customerEffectiveRights = await UserBiz.CustomerUserEffectiveRightsAsync(biz.UserId);
if (!customerEffectiveRights.CreateUnit) if (!customerEffectiveRights.CreateUnit)
{ return StatusCode(403, new ApiNotAuthorizedResponse());
return StatusCode(403, new ApiNotAuthorizedResponse());
}
if (!ModelState.IsValid) if (!ModelState.IsValid)
return BadRequest(new ApiErrorResponse(ModelState)); return BadRequest(new ApiErrorResponse(ModelState));