kstateome / django-cas

K-State's maintained version of django-cas
MIT License
111 stars 83 forks source link

How can i get the object:request to do some initialization for the login user #52

Closed junmingmiss closed 9 years ago

junmingmiss commented 9 years ago

I want to put some permissions in the session after the user finished the CAS authentication so that i can show the permissions in the page:index.html I find the 'CAS_RESPONSE_CALLBACKS ' to define a callback function,but it seens not enough for me i don't know the way to get the 'request',so that i can do...request.session["modules"] = utils.get_user_modules(user)

dstegelman commented 9 years ago

If you need to just do some work after a user logs in you can listen for the user_logged_in() signal provided by django.contrib.auth.signals. Django Cas logs the user in after they successfully authenticate so this signal is still sent.