xadmin
xadmin copied to clipboard
[BUG] Change permission gives ability to add item
Even if user have no "add" permission, but have "change" permission, he can add new item via admin panel and can see "Add ......" button.
I forgot to tell, that this situation happens only in inline elements. In xadmin code, there were no 'has_add_permission' check before creation of '+' icon.
I mean in file xadmin/templates/xadmin/edit_inline/base.html line:
should be changed by:
{% if has_add_permission %} {% endif %}
I made fix for that and it's waiting in 'pull requests'.