Merge pull request #4681 from netbox-community/4652-perms-in-plugintemplateextension

4652: Add `perms` to PluginTemplateExtension context
This commit is contained in:
Jeremy Stretch 2020-05-26 09:02:08 -04:00 committed by GitHub
commit b7cf85e8c8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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