From 7db547e4fd2ca4fe908c5a3c77738388cbc6291f Mon Sep 17 00:00:00 2001
From: chbaeh <chbaeh@gmail.com>
Date: Tue, 9 Apr 2019 16:47:35 +0200
Subject: [PATCH] ODPSH-293: redirect not logged in user

---
 ckanext/odsh/controller.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/ckanext/odsh/controller.py b/ckanext/odsh/controller.py
index 34b7eeeb..d1a81c5d 100644
--- a/ckanext/odsh/controller.py
+++ b/ckanext/odsh/controller.py
@@ -46,6 +46,8 @@ class OdshUserController(UserController):
         return super(OdshUserController,self).dashboard_datasets(id)
 
     def read(self, id=None):
+        if not c.user:
+            h.redirect_to(controller='user', action='login')
         return super(OdshUserController,self).read(id)
 
     def follow(self, id):
-- 
GitLab