Browse Source

[fix] [minor] do not allow website user access to app

version-14
Anand Doshi 12 years ago
parent
commit
9d1381c33b
2 changed files with 2 additions and 3 deletions
  1. +1
    -2
      public/js/wn/app.js
  2. +1
    -1
      webnotes/profile.py

+ 1
- 2
public/js/wn/app.js View File

@@ -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;
}


+ 1
- 1
webnotes/profile.py View File

@@ -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:


Loading…
Cancel
Save