Newbie here. My application name is ccad. And the model name is logbook. User A has no permission to edit, add or delete the logbook model from an available user permission.
So I tried hiding the save, save and continue editing, save and add another buttons from User A.
I followed the advised I found in SO. Here's from picomon inquiry that was answered by Sid. And daniel the same inquiry.
I ended up writing the code below to my template.
change_form.html located at {{template folder}}/admin/app_name/model_name/
{% if perms.ccad.add_logbook %}
<li><input type="submit" value="{% trans 'Save ' %}" class="grp-button grp-default" name="_save" {{ onclick_attrib }}/></li>
<li><input type="submit" value="{% trans 'Save and add another' %}" class="grp-button" name="_addanother" {{ onclick_attrib }} /></li>
<li><input type="submit" value="{% trans 'Save and continue editing' %}" class="grp-button" name="_continue" {{ onclick_attrib }}/></li>
{% endif %}
But the user with no permission can still see the buttons I mention.
I also try changing {% if perms.ccad.add_logbook %}
to {% if perms.ccad.can_add_logbook %}
with no avail.
What's best way to do this?