astrosat / django-astrosat-users

Common backend library for Astrosat projects' user management
GNU General Public License v3.0
2 stars 0 forks source link

RegistrationSerializer should not return the token key. #26

Closed allynt closed 4 years ago

allynt commented 4 years ago

Since registering a user doesn't actually log them in, it seems risky to return the token key from that view.

allynt commented 4 years ago

This was done in 8a7945b.

Now RegistrationView returns UserSerializerLite.

YASG was used to customise swagger documentation.

In retrospect, though, maybe I should have overwritten the Serializer rather than the View.

allynt commented 4 years ago

Actually, the Serializer has hard-coded support for all fields (which is as it should be). So overriding the view makes sense.