Skip to content

Commit a49214b

Browse files
author
Michał Szpadzik
committed
Fixed user permission check in inline model, where only people who have 'add_permission' perm, should have '+' icon to add new elements. It's fix for sshwsfc#142 from main django-xadmin project.
1 parent 631f129 commit a49214b

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

xadmin/templates/xadmin/edit_inline/base.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66

77
{% block box_title %}
88
{% if not formset.formset.detail_page %}
9+
{% if has_add_permission %}
910
<a class="add-row" id="{{ prefix }}-add-row" href="javascript:void(0)"><i class="icon fa fa-plus"></i></a>
1011
{% endif %}
12+
{% endif %}
1113
{{ formset.opts.verbose_name_plural|title }}
1214
{% endblock box_title %}
1315

0 commit comments

Comments
 (0)