manager: remove obsolete user_can_manage in exception list (#70185)
Permission is already checked by ManagedDeskMixin.
This commit is contained in:
parent
622e45fe4f
commit
b9952de586
|
@ -20,8 +20,8 @@
|
|||
<ul class="objects-list single-links">
|
||||
{% for exception in object_list %}
|
||||
<li>
|
||||
<a {% if user_can_manage and not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.id %}"{% endif %}>{{ exception }}</a>
|
||||
{% if user_can_manage and not exception.from_settings and not exception.read_only %}<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}{% if not page_obj %}?from_popup{% endif %}">{% trans "remove" %}</a>{% endif %}
|
||||
<a {% if not exception.read_only %}href="{% url 'chrono-manager-time-period-exception-edit' pk=exception.id %}"{% endif %}>{{ exception }}</a>
|
||||
{% if not exception.from_settings and not exception.read_only %}<a rel="popup" class="delete" href="{% url 'chrono-manager-time-period-exception-delete' pk=exception.id %}{% if not page_obj %}?from_popup{% endif %}">{% trans "remove" %}</a>{% endif %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
|
|
|
@ -3052,11 +3052,6 @@ class TimePeriodExceptionListView(ManagedDeskMixin, ListView):
|
|||
Q(desk=self.desk) | Q(unavailability_calendar__desks=self.desk), end_datetime__gte=now()
|
||||
)
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super().get_context_data(**kwargs)
|
||||
context['user_can_manage'] = self.desk.agenda.can_be_managed(self.request.user)
|
||||
return context
|
||||
|
||||
|
||||
time_period_exception_list = TimePeriodExceptionListView.as_view()
|
||||
|
||||
|
|
Loading…
Reference in New Issue