mirror of
https://github.com/HendrikRauh/inventree-app.git
synced 2026-01-13 11:36:24 +00:00
Determine if plugins are enabled when connecting to the server
This commit is contained in:
parent
3bb370bee1
commit
f0c5fb8355
1 changed files with 6 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue