ubd-frog / frog

A server and client solution to viewing and filtering large image and video collections
MIT License
50 stars 8 forks source link

Always redirect user if not logged in. #114

Closed arturleao closed 11 years ago

arturleao commented 11 years ago

If a user is not logged in and lands on a /gallery/ link or somewhere else, the page gets loaded and presented to the user, but without any content (because the decorator you are using for login_required).

The correct approach should be that the user, if not logged in gets redirected to the login page no matter what page he lands on first.

I've fixed this by adding the decorator to the GET method of the gallery view but there's probably a better way to do it?!

EDIT: The _filter method needs to account for anonymous users when determining search criteria that could be preferences based

theiviaxx commented 11 years ago

This is actually a bug in the _filter method and that I forgot to accomodate anonymous users. I wanted you to be able to send a link to anyone and say, hey look at this stuff and the user wouldn't have to do anything, Logging in has only a few benefits