diff --git a/public/js/wn/app.js b/public/js/wn/app.js index 09d93a47ec..83196822ce 100644 --- a/public/js/wn/app.js +++ b/public/js/wn/app.js @@ -28,8 +28,7 @@ wn.Application = Class.extend({ callback: function(r, rt) { wn.provide('wn.boot'); wn.boot = r; - if(wn.boot.profile.name=='Guest' || - (wn.boot.profile.roles.length===1 && wn.boot.profile.roles[0]==="All")) { + if(wn.boot.profile.name==='Guest' || wn.boot.profile.user_type==="Website User") { window.location = 'index.html'; return; } diff --git a/webnotes/profile.py b/webnotes/profile.py index 1b689e60a7..81848ab988 100644 --- a/webnotes/profile.py +++ b/webnotes/profile.py @@ -133,7 +133,7 @@ class Profile: def load_profile(self): d = webnotes.conn.sql("""select email, first_name, last_name, - email_signature, background_image + email_signature, background_image, user_type from tabProfile where name = %s""", self.name, as_dict=1)[0] if not self.can_read: