End User License consent system added
This commit is contained in:
@@ -274,8 +274,31 @@ namespace AyaNova.Api.Controllers
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="acceptCode"></param>
|
||||
/// <returns>HTTP 204 No Content result code on success or fail code with explanation</returns>
|
||||
[AllowAnonymous]
|
||||
[HttpPost("lc")]
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public async Task<IActionResult> lc([FromBody] string acceptCode)
|
||||
{
|
||||
//END USER LICENSE AGREEMENT ROUTE ONLY CALLED FROM WEBAPP AND HIDDEN FROM VIEW AS A ROUTE
|
||||
|
||||
|
||||
//SuperUser only and must have accept code
|
||||
if (string.IsNullOrWhiteSpace(acceptCode) || acceptCode.ToLowerInvariant() != "iaccepttheagreement")
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
|
||||
await Core.License.FlagEULA(ct, log);
|
||||
|
||||
//Log
|
||||
await EventLogProcessor.LogEventToDatabaseAsync(new Event(1, 0, AyaType.Global, AyaEvent.Modified, "End user license agreement consent obtained"), ct);
|
||||
|
||||
return NoContent();
|
||||
}
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user