7 lines
215 B
Python
Raw Permalink Normal View History

2025-12-04 10:04:21 +08:00
from app.models.domain.comments import Comment
from app.models.domain.users import User
def check_user_can_modify_comment(comment: Comment, user: User) -> bool:
return comment.author.username == user.username