This commit is contained in:
2020-12-15 20:46:06 +00:00
parent 02bf076a19
commit a118282fbb
7 changed files with 372 additions and 283 deletions

View File

@@ -110,7 +110,16 @@ namespace AyaNova.PlugIn.V8
if (a.HttpResponse.IsSuccessStatusCode)
{
JWT = a.ObjectResponse["data"]["token"].Value<string>();
JWT=a.ObjectResponse["data"]["token"].Value<string>();
//Must be *the* SuperUser to continue:
a = await GetAsync("user/amsu");
var IsSuperUser = a.ObjectResponse["data"].Value<bool>();
if (!IsSuperUser) {
JWT = string.Empty;
return false;
}
return true;
}