wger-project / wger

Self hosted FLOSS fitness/workout, nutrition and weight tracker
https://wger.de
GNU Affero General Public License v3.0
3.22k stars 585 forks source link

Remove guest user and No registration #367

Closed pchaganti closed 7 years ago

pchaganti commented 7 years ago

Modified settings.py to remove guest users and registration. Here are the relevant settings. Does not seem to have any effect at all. Also changed debug to false, but emails are not being sent, even though reset password says email was sent successfully. Anyone have any pointers? Using latest master installed from git today.

DEBUG = False
WGER_SETTINGS['ALLOW_REGISTRATION'] = False
WGER_SETTINGS['ALLOW_GUEST_USERS'] = False
rolandgeider commented 7 years ago

I could successfully turn off the registration and the guest users, do you have perhaps two settings files? (by default the bootstrap script will create one on .config/wger/settings.py unless you specify something else).

As for the emails, you need to configure an email backend in django, take a look at its documentation page to see what's available. I see that this is mentioned in the docs in passing, I'll be updating this so it's clearer

rolandgeider commented 7 years ago

TODO for me: move the section Miscellaneous settings to the settings page, where the wger-specific ones are mentioned

pchaganti commented 7 years ago

Ah. Will add the email config settings for the backend and try it out.

I am passing a settings.py to the start. Unable to turn off the reg and guest user. Will double check if there is another settings.py that is still being taken into consideration.

wger start --settings-path
pchaganti commented 7 years ago

For anyone else running into this. Add the following to settings.py:

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'urusername@gmail.com'
EMAIL_HOST_PASSWORD = 'password'
rolandgeider commented 7 years ago

Did you manage to deactivate guest users and registration?

pchaganti commented 7 years ago

Yes. I was able to.

thanks!

rolandgeider commented 7 years ago

Great, closing the issue