| Total Complexity | 2 |
| Total Lines | 22 |
| Duplicated Lines | 0 % |
| Coverage | 71.43% |
| Changes | 0 | ||
| 1 | 1 | from plugin.core.environment import translate as _ |
|
| 9 | 1 | class ApiOption(SimpleOption): |
|
| 10 | 1 | key = 'api.enabled' |
|
| 11 | 1 | type = 'boolean' |
|
| 12 | |||
| 13 | 1 | default = None |
|
| 14 | 1 | scope = 'server' |
|
| 15 | |||
| 16 | 1 | group = (_('API'),) |
|
| 17 | 1 | label = _('Enabled') |
|
| 18 | 1 | description = _( |
|
| 19 | "Enables the plugin administration API, disabling this option will block access to the configuration site." |
||
| 20 | ) |
||
| 21 | 1 | order = 200 |
|
| 22 | |||
| 23 | 1 | @property |
|
| 24 | def value(self): |
||
| 25 | value = super(ApiOption, self).value |
||
| 26 | |||
| 27 | if value is None: |
||
| 28 | return True |
||
| 29 | |||
| 30 | return value |
||
| 31 |