This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user