From 27700d316f7ae94522c073f4533822003288fd6c Mon Sep 17 00:00:00 2001 From: Sander Steffann Date: Fri, 22 May 2020 22:24:05 +0200 Subject: [PATCH 1/4] Add `perms` to PluginTemplateExtension context --- netbox/extras/templatetags/plugins.py | 1 + 1 file changed, 1 insertion(+) diff --git a/netbox/extras/templatetags/plugins.py b/netbox/extras/templatetags/plugins.py index b66cce0a6..3f593fa10 100644 --- a/netbox/extras/templatetags/plugins.py +++ b/netbox/extras/templatetags/plugins.py @@ -18,6 +18,7 @@ def _get_registered_content(obj, method, template_context): 'object': obj, 'request': template_context['request'], 'settings': template_context['settings'], + 'perms': template_context['perms'], } model_name = obj._meta.label_lower From ff3b348771c07802b13c6a813ef6e4aed4e0b46c Mon Sep 17 00:00:00 2001 From: Sander Steffann Date: Fri, 22 May 2020 22:28:04 +0200 Subject: [PATCH 2/4] Add `csrf_token` to PluginTemplateExtension context --- netbox/extras/templatetags/plugins.py | 1 + 1 file changed, 1 insertion(+) diff --git a/netbox/extras/templatetags/plugins.py b/netbox/extras/templatetags/plugins.py index b66cce0a6..e63d25df1 100644 --- a/netbox/extras/templatetags/plugins.py +++ b/netbox/extras/templatetags/plugins.py @@ -18,6 +18,7 @@ def _get_registered_content(obj, method, template_context): 'object': obj, 'request': template_context['request'], 'settings': template_context['settings'], + 'csrf_token': template_context['csrf_token'], } model_name = obj._meta.label_lower From 9cde377133af3ac0e61384757733afa4cc09f653 Mon Sep 17 00:00:00 2001 From: kobayashi Date: Tue, 26 May 2020 01:23:23 -0400 Subject: [PATCH 3/4] Closes #4676: Set default value of REMOTE_AUTH_AUTO_CREATE_USER as False in docs --- docs/configuration/optional-settings.md | 2 +- docs/release-notes/version-2.8.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/configuration/optional-settings.md b/docs/configuration/optional-settings.md index 4d5251f25..617878fbb 100644 --- a/docs/configuration/optional-settings.md +++ b/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`.) diff --git a/docs/release-notes/version-2.8.md b/docs/release-notes/version-2.8.md index 16712bb79..0827fc535 100644 --- a/docs/release-notes/version-2.8.md +++ b/docs/release-notes/version-2.8.md @@ -16,6 +16,7 @@ * [#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 +* [#4676](https://github.com/netbox-community/netbox/issues/4676) - Set default value of `REMOTE_AUTH_AUTO_CREATE_USER` as `False` in docs --- From a5785552d9d832029b288aa22e9d8e09164c955e Mon Sep 17 00:00:00 2001 From: Jeremy Stretch Date: Tue, 26 May 2020 09:05:18 -0400 Subject: [PATCH 4/4] Changelog for #4651, #4652 --- docs/release-notes/version-2.8.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/release-notes/version-2.8.md b/docs/release-notes/version-2.8.md index 16712bb79..9d3979398 100644 --- a/docs/release-notes/version-2.8.md +++ b/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