diff --git a/README.md b/README.md
index 5caa9e3..2334fba 100644
--- a/README.md
+++ b/README.md
@@ -53,6 +53,353 @@ PLUGINS = [
]
```
+### Validator installation
+By default, the migration will install the validator for all models. If you're using a statically configured NetBox
+instance you can use this `CUSTOM_VALIDATORS` block to install it for all models:
+Show configuration snippet
+
+```python
+CUSTOM_VALIDATORS = {
+ "circuits.circuit": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "circuits.circuittermination": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "circuits.circuittype": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "circuits.provider": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "circuits.provideraccount": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "circuits.providernetwork": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.cable": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.cablepath": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.cabletermination": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.consoleport": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.consoleporttemplate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.consoleserverport": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.consoleserverporttemplate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.device": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.devicebay": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.devicebaytemplate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.devicerole": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.devicetype": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.frontport": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.frontporttemplate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.interface": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.interfacetemplate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.inventoryitem": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.inventoryitemrole": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.inventoryitemtemplate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.location": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.manufacturer": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.module": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.modulebay": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.modulebaytemplate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.moduletype": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.platform": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.powerfeed": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.poweroutlet": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.poweroutlettemplate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.powerpanel": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.powerport": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.powerporttemplate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.rack": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.rackreservation": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.rackrole": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.rearport": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.rearporttemplate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.region": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.site": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.sitegroup": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.virtualchassis": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "dcim.virtualdevicecontext": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.bookmark": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.branch": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.cachedvalue": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.configcontext": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.configtemplate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.customfield": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.customfieldchoiceset": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.customlink": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.dashboard": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.eventrule": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.exporttemplate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.imageattachment": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.journalentry": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.objectchange": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.reportmodule": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.savedfilter": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.script": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.scriptmodule": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.stagedchange": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.tag": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.taggeditem": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "extras.webhook": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.aggregate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.asn": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.asnrange": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.fhrpgroup": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.fhrpgroupassignment": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.ipaddress": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.iprange": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.prefix": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.rir": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.role": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.routetarget": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.service": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.servicetemplate": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.vlan": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.vlangroup": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "ipam.vrf": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "tenancy.contact": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "tenancy.contactassignment": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "tenancy.contactgroup": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "tenancy.contactrole": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "tenancy.tenant": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "tenancy.tenantgroup": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "virtualization.cluster": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "virtualization.clustergroup": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "virtualization.clustertype": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "virtualization.virtualdisk": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "virtualization.virtualmachine": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "virtualization.vminterface": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "vpn.ikepolicy": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "vpn.ikeproposal": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "vpn.ipsecpolicy": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "vpn.ipsecprofile": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "vpn.ipsecproposal": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "vpn.l2vpn": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "vpn.l2vpntermination": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "vpn.tunnel": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "vpn.tunnelgroup": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "vpn.tunneltermination": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "wireless.wirelesslan": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "wireless.wirelesslangroup": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ],
+ "wireless.wirelesslink": [
+ "netbox_field_permissions.validators.FieldPermissionValidator"
+ ]
+}
+```
+
Your NetBox configuration is statically configured. This means the plugin can not manage the validators + automatically or at user request. You can still manually add/remove the validators to your configuration using the prepared configuration here. The validator is required to check the fields a user/group has access to.
+If you want to switch to a dynamic configuration please consult the NetBox documentation on config revisions.
+
+ CUSTOM_VALIDATORS = {{ install_validators|json }}
+
+ {% endspaceless %}
+
+ CUSTOM_VALIDATORS = {{ uninstall_validators|json }}
+
+ {% endspaceless %}
+