Default group required
* adds access checks depending on the current group confgiguration of a user * removes buttons for adding/editing or removing data if default group is not set for a user * removes buttons for adding/removing related data in unshared interventions * removes shared-user setting from share menu of an intervention if user is not zb or ets * renames has_access() from intervention Model into is_shared_with() for more clarity * fixes bug in group check in_group() from utils.py
This commit is contained in:
@@ -10,10 +10,12 @@
|
||||
</div>
|
||||
<div class="col-sm-6">
|
||||
<div class="d-flex justify-content-end">
|
||||
{% if is_default_member and has_access %}
|
||||
<button class="btn btn-outline-default btn-modal" data-form-url="{% url 'compensation:pay-new' intervention.id %}" title="{% trans 'Add new payment' %}">
|
||||
{% fa5_icon 'plus' %}
|
||||
{% fa5_icon 'money-bill-wave' %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -47,9 +49,11 @@
|
||||
<td class="align-middle">{{ pay.due_on }}</td>
|
||||
<td class="align-middle">{{ pay.comment }}</td>
|
||||
<td>
|
||||
{% if is_default_member and has_access %}
|
||||
<button data-form-url="{% url 'compensation:pay-remove' pay.id %}" class="btn btn-default btn-modal" title="{% trans 'Remove payment' %}">
|
||||
{% fa5_icon 'trash' %}
|
||||
</button>
|
||||
{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user