Просмотр исходного кода

Merge branch 'develop' into 4684-devicetype-import-comment

Jeremy Stretch 5 лет назад
Родитель
Сommit
f04340679e

+ 1 - 1
docs/configuration/optional-settings.md

@@ -385,7 +385,7 @@ When remote user authentication is in use, this is the name of the HTTP header w
 
 ## REMOTE_AUTH_AUTO_CREATE_USER
 
-Default: `True`
+Default: `False`
 
 If true, NetBox will automatically create local accounts for users authenticated via a remote service. (Requires `REMOTE_AUTH_ENABLED`.)
 

+ 4 - 1
docs/release-notes/version-2.8.md

@@ -6,6 +6,8 @@
 
 ### Enhancements
 
+* [#4651](https://github.com/netbox-community/netbox/issues/4651) - Add `csrf_token` context for plugin templates
+* [#4652](https://github.com/netbox-community/netbox/issues/4652) - Add permissions context for plugin templates
 * [#4665](https://github.com/netbox-community/netbox/issues/4665) - Add NEMA L14 and L21 power port/outlet types
 
 ### Bug Fixes
@@ -16,7 +18,8 @@
 * [#4647](https://github.com/netbox-community/netbox/issues/4647) - Fix caching invalidation issue related to assigning new IP addresses to interfaces
 * [#4648](https://github.com/netbox-community/netbox/issues/4648) - Fix bulk CSV import of child devices
 * [#4649](https://github.com/netbox-community/netbox/issues/4649) - Fix interface assignment for bulk-imported IP addresses
-* [#4684](https://github.com/netbox-community/netbox/issues/4684) - Fix ignored comment field when adding device type via YAML/JSON import.
+* [#4676](https://github.com/netbox-community/netbox/issues/4676) - Set default value of `REMOTE_AUTH_AUTO_CREATE_USER` as `False` in docs
+* [#4684](https://github.com/netbox-community/netbox/issues/4684) - Respect `comments` field when importing device type in YAML/JSON format
 
 ---
 

+ 2 - 0
netbox/extras/templatetags/plugins.py

@@ -18,6 +18,8 @@ def _get_registered_content(obj, method, template_context):
         'object': obj,
         'request': template_context['request'],
         'settings': template_context['settings'],
+        'csrf_token': template_context['csrf_token'],
+        'perms': template_context['perms'],
     }
 
     model_name = obj._meta.label_lower