2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-04-28 05:26:47 +00:00

Determine if plugins are enabled when connecting to the server

This commit is contained in:
Oliver Walters 2022-03-25 20:52:51 +11:00
parent 3bb370bee1
commit f0c5fb8355

View File

@ -227,6 +227,10 @@ class InvenTreeAPI {
int get apiVersion => _apiVersion;
bool _pluginsEnabled = false;
bool pluginsEnabled() => supportPlugins() && _pluginsEnabled;
// Getter for server version information
String get version => _version;
@ -349,6 +353,8 @@ class InvenTreeAPI {
return false;
}
_pluginsEnabled = (data["plugins_enabled"] ?? false) as bool;
/**
* Request user token information from the server
* This is the stage that we check username:password credentials!