librenms/misc/config_schema.json
Tony Murray 2cd207028a
Implement RBAC (only built in roles) (#15212)
* Install bouncer

* Seeder and level migration

* Display and edit roles

* remove unused deluser page

* Update Radius and SSO to assign roles

* update AlertUtil direct level check to use roles instead

* rewrite ircbot auth handling

* Remove legacy auth getUserlist and getUserlevel methods, add getRoles
Set roles in LegacyUserProvider

* Small cleanups

* centralize role sync code
show roles on user preferences page

* VueSelect component WIP and a little docs

* WIP

* SelectControllers id and text fields.

* LibrenmsSelect component extracted from SettingSelectDynamic

* Handle multiple selections

* allow type coercion

* full width settings

* final style adjustments

* Final compiled assets update

* Style fixes

* Fix SSO tests

* Lint cleanups

* small style fix

* don't use json yet

* Update baseline for usptream package issues

* Change schema, not 100% sure it is correct
not sure why xor doesn't work
2023-08-28 00:13:40 -05:00

151 lines
5.6 KiB
JSON

{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"properties": {
"Warning!": {
"type": "string"
},
"config": {
"type": "object",
"propertyNames": {
"pattern": "^[a-zA-Z0-9_.\\-]+$"
},
"additionalProperties": {
"type": "object",
"properties": {
"default": {},
"type": {
"type": "string"
},
"section": {
"type": "string"
},
"group": {
"type": "string"
},
"order": {
"type": "integer"
},
"options": {
"type": "object"
},
"units": {
"type": "string"
},
"validate": {
"propertyNames": {
"pattern": "^value",
"type": "string"
}
},
"when": {
"properties": {
"setting": {
"type": "string"
},
"operator": {
"type": "string",
"enum": [
"equals",
"in"
]
},
"value": {
"type": ["string", "array"]
}
}
},
"disabled": {
"type": "boolean"
},
"hidden": {
"type": "boolean"
}
},
"required": ["type"],
"additionalProperties": false,
"anyOf": [
{
"properties": {
"type": {"const": "select"},
"options": {
"type": "object",
"minProperties": 2
}
},
"required": ["options"]
},
{
"properties": {
"type": {"const": "select-dynamic"},
"options": {
"type": "object",
"properties": {
"allowClear": {"type": "boolean"},
"callback": {"type": "string"},
"placeholder": {"type": "string"},
"target": {"type": "string"}
},
"minProperties": 1,
"required": ["target"],
"additionalProperties": false
},
"validate": {
"minProperties": 1
}
},
"required": ["options", "validate"]
},
{
"properties": {
"type": {"const": "group-role-map"},
"options": {
"type": "object",
"properties": {
"groupPlaceholder": {"type": "string"}
},
"additionalProperties": false
},
"validate": {
"minProperties": 1
}
}
},
{
"properties": {
"type": {
"type": "string",
"enum": [
"integer",
"text",
"boolean",
"array",
"array-sub-keyed",
"password",
"email",
"color",
"float",
"graph",
"snmp3auth",
"ad-groups",
"oxidized-maps",
"executable",
"directory"
]
}
},
"not": { "required": ["options"]}
}
],
"dependencies": {
"group": { "required": ["order", "section"] },
"order": { "required": ["group", "section"] },
"section": { "required": ["group", "order"] }
}
}
}
},
"required": ["Warning!", "config"],
"additionalProperties": false
}