danirus / django-comments-xtd

A pluggable Django comments application with thread support, follow-up notifications, mail confirmation, like/dislike flags, moderation, a ReactJS plugin and Bootstrap 5.3.
https://django-comments-xtd.readthedocs.io
BSD 2-Clause "Simplified" License
594 stars 158 forks source link

Require registration to post #186

Closed jimkring closed 4 years ago

jimkring commented 4 years ago

Hi! Great application!

What's the recommended way to require a user be logged in (registered) in order to post comments? If they aren't signed in, I'd like to redirect them to the login page.

Thanks!

danirus commented 4 years ago

Thanks @jimkring. In the very last version of the docs I added such use case.

jimkring commented 4 years ago

Hi @danirus. That's fantastic! It's great that you took the time to document these use cases.

Suggestion: Maybe add the 'who_can_post': 'users' to the tutorial >> commenting options section, so that we're exposed to this setting early on in the install/setup process.

COMMENTS_XTD_APP_MODEL_OPTIONS = {
    'default': {
        'allow_flagging': False,
        'allow_feedback': False,
        'show_feedback': False,
        'who_can_post': 'users'  # << maybe add this line to the 'tutorial >> commenting' options section
    }
}

I've created an issue for this suggestion: https://github.com/danirus/django-comments-xtd/issues/189