mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-15 19:55:27 +00:00
Determine if plugins are enabled when connecting to the server
This commit is contained in:
@ -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