This commit is contained in:
@@ -192,9 +192,9 @@ namespace AyaNova.Api.Controllers
|
||||
/// Posting to this route causes AyaNova completely erase all data in it's database and erase all attachment files
|
||||
/// returning the database to an empty state
|
||||
///
|
||||
/// The only items retained are the Manager account and the license key
|
||||
/// The only items retained are the SuperUser account and the license key
|
||||
///
|
||||
/// (Only *the* Manager account can use this route)
|
||||
/// (Only *the* SuperUser account can use this route)
|
||||
/// </summary>
|
||||
/// <param name="acceptCode">Must be "I understand"</param>
|
||||
/// <returns>HTTP 204 No Content result code on success or fail code with explanation</returns>
|
||||
@@ -209,7 +209,7 @@ namespace AyaNova.Api.Controllers
|
||||
|
||||
long UserId = UserIdFromContext.Id(HttpContext.Items);
|
||||
|
||||
//Manager only and must have accept code
|
||||
//SuperUser only and must have accept code
|
||||
if (UserId != 1 || string.IsNullOrWhiteSpace(acceptCode) || acceptCode.ToLowerInvariant() != "i understand")
|
||||
return StatusCode(403, new ApiNotAuthorizedResponse());
|
||||
|
||||
|
||||
Reference in New Issue
Block a user