mirror of
https://github.com/inventree/inventree-app.git
synced 2025-04-28 13:36:50 +00:00
Determine if plugins are enabled when connecting to the server
This commit is contained in:
parent
3bb370bee1
commit
f0c5fb8355
@ -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!
|
||||
|
Loading…
x
Reference in New Issue
Block a user