On 1/23/26 17:39, iMark wrote:
Hi All,
Can anyone give me a pointer on disabling "Mass operations" (subscribe/removal) in Postorius.
Just removing the menu link from the list-owners administration pages would be a good start.
On 2026-01-24 02:01, Mark Sapiro wrote:
This patch will do that ``` --- a/src/postorius/templates/postorius/menu/list_nav.html +++ b/src/postorius/templates/postorius/menu/list_nav.html @@ -84,6 +84,7 @@ {% if user.is_superuser or user.is_list_owner %} <li class="nav-item"><a href="{% url 'list_template_list' list.list_id %}" class="nav-link {% nav_active_class current 'templates' %}">{% trans 'Templates' %}</a></li> <li class="nav-item"><a href="{% url 'list_settings' list.list_id %}" class="nav-link {% nav_active_class current 'list_settings' %} ">{% trans 'Settings' %}</a></li> + {% if user.is_superuser %} <li class="dropdown nav-item"> <a href="#" class="{% nav_active_class current 'list_mass_ops' %} dropdown-toggle nav-link" data-bs-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false"> @@ -98,6 +99,7 @@ <li><a href="{% url 'mass_removal' list.list_id %}" class="dropdown-item">{% trans 'Mass removal' %}</a></li> </noscript> </li> + {% endif %} <li class="nav-item"><a href="{% url 'list_bans' list.list_id %}" class="{% nav_active_class current 'list_bans' %} nav-link">{% trans 'Ban List' %}</a></li> <li class="nav-item"><a href="{% url 'list_header_matches' list.list_id %}" class="nav-link {% nav_active_class current 'list_header_matches' %}">{% trans 'Header filters' %}</a></li> <li class="nav-item"><a href="{% url 'list_delete' list.list_id %}" class="{% nav_active_class current 'list_delete' %} nav-link">{% trans 'Delete' %}</a></li> ``` Some lines in the above may be wrapped but basically it just adds
{% if user.is_superuser %}
and
{% endif %}
around the Mass operations code.
Thank you very much Mark. That is perfect. /opt/mailman/venv/lib/python3.11/site-packages/postorius/templates/postorius/menu/list_nav.html Cheers.