mirror of
https://github.com/inventree/inventree-app.git
synced 2026-10-08 08:07:09 +00:00
Determine if plugins are enabled when connecting to the server
This commit is contained in:
1 parent
3bb370bee1
commit
f0c5fb8355
1 file changed
+6
@@ -227,6 +227,10 @@ class InvenTreeAPI {
|
|||||||
|
|
||||||
int get apiVersion => _apiVersion;
|
int get apiVersion => _apiVersion;
|
||||||
|
|
||||||
|
bool _pluginsEnabled = false;
|
||||||
|
|
||||||
|
bool pluginsEnabled() => supportPlugins() && _pluginsEnabled;
|
||||||
|
|
||||||
// Getter for server version information
|
// Getter for server version information
|
||||||
String get version => _version;
|
String get version => _version;
|
||||||
|
|
||||||
@@ -349,6 +353,8 @@ class InvenTreeAPI {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_pluginsEnabled = (data["plugins_enabled"] ?? false) as bool;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Request user token information from the server
|
* Request user token information from the server
|
||||||
* This is the stage that we check username:password credentials!
|
* This is the stage that we check username:password credentials!
|
||||||
|
|||||||
Reference in new issue
Block a user