Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure DELETE method for delete alias view #2755

Merged
merged 2 commits into from
Jan 23, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Ensure DELETE method for delete alias view
  • Loading branch information
tonioo committed Jan 20, 2023
commit d4b7bddc50927601bd820d311ab3f577a77c0214
2 changes: 2 additions & 0 deletions modoboa/admin/views/alias.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
from django.urls import reverse
from django.utils.translation import ugettext as _, ungettext
from django.views import generic
from django.views.decorators.http import require_http_methods

from modoboa.core import signals as core_signals
from modoboa.lib.exceptions import Conflict, PermDeniedException
Expand Down Expand Up @@ -93,6 +94,7 @@ def editalias(request, alid, tplname="admin/aliasform.html"):

@login_required
@permission_required("admin.delete_alias")
@require_http_methods(["DELETE"])
def delalias(request):
selection = request.GET["selection"].split(",")
for alid in selection:
Expand Down