How can i go about redirecting ckan to a external URL unless logged in?
I added the following code below in ckan/logic/auth/get.py under the method site_read
if context.get('auth_user_obj') is not None:
return {'success': True}
else:
return {'success': False, 'msg': 'User not logged in. Pleaes authenticate with AD.'}
But i only get as far as just saying permission denied on each page unless logged in. Is there a way i can make it just redirect to an external url if not signed in or authenticated?
Thanks!
Implement IRoutes interface
In the before_map function check if a user is logged in, if not use map.redirect to your external URL.