...
 
Commits (1)
......@@ -65,7 +65,6 @@ class CommentNotification(DatabaseModel):
self.comment = comment
self.notification_type = notification_type
def __acl__(self) -> Sequence[Tuple[str, Any, str]]:
"""Pyramid security ACL."""
acl = []
......
......@@ -21,6 +21,7 @@ def comment_by_id36(request: Request, comment_id36: str) -> Comment:
return get_resource(request, query)
@use_kwargs(
CommentSchema(only=('comment_id36',)),
locations=('matchdict',),
......@@ -29,8 +30,11 @@ def notification_by_comment_id36(
request: Request,
comment_id36: str
) -> Comment:
"""Get a comment notification specified by {comment_id36} in the route (or 404)."""
"""Get a comment notification specified by {comment_id36} in the route.
Looks up a comment notification from the request user and a {comment_id36}
specified in the route.
"""
if not request.user:
raise HTTPForbidden
......
......@@ -7,8 +7,8 @@ from pyramid.request import Request
from pyramid.security import Allow, Authenticated
from tildes.resources.comment import (
comment_by_id36,
notification_by_comment_id36,
comment_by_id36,
notification_by_comment_id36,
)
from tildes.resources.group import group_by_path
from tildes.resources.message import message_conversation_by_id36
......