Fixes permissions on settings invite request page

This commit is contained in:
Mouse Reeve 2022-11-16 18:03:52 -08:00
parent 1a8580cdbc
commit 5a7afe45a2

View file

@ -85,6 +85,11 @@ class Invite(View):
# post handling is in views.register.Register
@method_decorator(login_required, name="dispatch")
@method_decorator(
permission_required("bookwyrm.create_invites", raise_exception=True),
name="dispatch",
)
class ManageInviteRequests(View):
"""grant invites like the benevolent lord you are"""
@ -177,6 +182,10 @@ class InviteRequest(View):
@require_POST
@method_decorator(
permission_required("bookwyrm.create_invites", raise_exception=True),
name="dispatch",
)
def ignore_invite_request(request):
"""hide an invite request"""
invite_request = get_object_or_404(