case 4727 - DB ID and licence to staff only
server-info returns the DB ID and licence, and global-biz-setting/client the DB ID and licensee, only to Service and NotService users, as the About form already shows them; customer contacts and subcontractors get empty values. F29 fixed, AyaNova half of F39 done (4727 step 3). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -119,6 +119,9 @@ namespace AyaNova.Api.Controllers
|
||||
[HttpGet("server-info")]
|
||||
public ActionResult ServerInfo()
|
||||
{
|
||||
//case 4727 (F29): the DB ID and licence go to staff only (Service, NotService), as the About form shows them
|
||||
var userType = UserTypeFromContext.Type(HttpContext.Items);
|
||||
bool staff = userType == UserType.Service || userType == UserType.NotService;
|
||||
return Ok(new
|
||||
{
|
||||
data = new
|
||||
@@ -127,8 +130,8 @@ namespace AyaNova.Api.Controllers
|
||||
DBSchemaVersion = AySchema.currentSchema,
|
||||
ServerLocalTime = DateUtil.ServerDateTimeString(System.DateTime.UtcNow),
|
||||
ServerTimeZone = TimeZoneInfo.Local.Id,
|
||||
ServerDbId = AyaNova.Core.License.ServerDbId,
|
||||
License = AyaNova.Core.License.LicenseInfoAsJson,
|
||||
ServerDbId = staff ? AyaNova.Core.License.ServerDbId : string.Empty,
|
||||
License = staff ? AyaNova.Core.License.LicenseInfoAsJson : null,
|
||||
#if (SUBSCRIPTION_BUILD)
|
||||
Build = "Subscription"
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user