mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2025-03-30 07:05:29 +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 = Env()
|
||||||
env.read_env()
|
env.read_env()
|
||||||
DOMAIN = env("DOMAIN")
|
DOMAIN = env("DOMAIN")
|
||||||
VERSION = "0.4.6"
|
VERSION = "0.5.0"
|
||||||
|
|
||||||
RELEASE_API = env(
|
RELEASE_API = env(
|
||||||
"RELEASE_API",
|
"RELEASE_API",
|
||||||
|
|
|
@ -85,6 +85,11 @@ class Invite(View):
|
||||||
# post handling is in views.register.Register
|
# 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):
|
class ManageInviteRequests(View):
|
||||||
"""grant invites like the benevolent lord you are"""
|
"""grant invites like the benevolent lord you are"""
|
||||||
|
|
||||||
|
@ -177,6 +182,7 @@ class InviteRequest(View):
|
||||||
|
|
||||||
|
|
||||||
@require_POST
|
@require_POST
|
||||||
|
@permission_required("bookwyrm.create_invites", raise_exception=True)
|
||||||
def ignore_invite_request(request):
|
def ignore_invite_request(request):
|
||||||
"""hide an invite request"""
|
"""hide an invite request"""
|
||||||
invite_request = get_object_or_404(
|
invite_request = get_object_or_404(
|
||||||
|
|
Loading…
Reference in a new issue