[minor] [fix] has_permission
This commit is contained in:
parent
569408e93d
commit
bca8d12b0a
1 changed files with 3 additions and 2 deletions
|
|
@ -336,9 +336,10 @@ def has_permission(doctype, ptype="read", refdoc=None):
|
|||
"""check if user has permission"""
|
||||
from webnotes.utils import cint
|
||||
|
||||
meta = get_doctype(doctype)
|
||||
if session.user=="Administrator" or meta[0].istable==1:
|
||||
if session.user=="Administrator" or webnotes.conn.get_value("DocType", doctype, "istable")==1:
|
||||
return True
|
||||
|
||||
meta = get_doctype(doctype)
|
||||
|
||||
# get user permissions
|
||||
user_roles = get_roles()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue