mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-23 08:36:32 +00:00
Merge pull request #2395 from bookwyrm-social/settings-view-perms
Fixes permissions on settings invite request page
This commit is contained in:
commit
2dad14bdcf
2 changed files with 7 additions and 1 deletions
|
@ -11,7 +11,7 @@ from django.utils.translation import gettext_lazy as _
|
|||
env = Env()
|
||||
env.read_env()
|
||||
DOMAIN = env("DOMAIN")
|
||||
VERSION = "0.4.6"
|
||||
VERSION = "0.5.0"
|
||||
|
||||
RELEASE_API = env(
|
||||
"RELEASE_API",
|
||||
|
|
|
@ -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,7 @@ class InviteRequest(View):
|
|||
|
||||
|
||||
@require_POST
|
||||
@permission_required("bookwyrm.create_invites", raise_exception=True)
|
||||
def ignore_invite_request(request):
|
||||
"""hide an invite request"""
|
||||
invite_request = get_object_or_404(
|
||||
|
|
Loading…
Reference in a new issue