company whitelist fix
This commit is contained in:
parent
5fe5df370f
commit
a9bd79487d
@ -2,7 +2,7 @@ import webnotes
|
||||
from webnotes.utils import cint
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_online_users():
|
||||
def get_online_users(arg=None):
|
||||
# get users
|
||||
return webnotes.conn.sql("""SELECT DISTINCT t1.user, t2.first_name, t2.last_name
|
||||
from tabSessions t1, tabProfile t2
|
||||
@ -10,8 +10,7 @@ def get_online_users():
|
||||
and t1.user not in ('Guest','Administrator')
|
||||
and TIMESTAMPDIFF(HOUR,t1.lastupdate,NOW()) <= 1""", as_list=1) or []
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_unread_messages():
|
||||
def get_unread_messages(arg=None):
|
||||
"returns unread (docstatus-0 messages for a user)"
|
||||
return cint(webnotes.conn.sql("""SELECT COUNT(*) FROM `tabComment Widget Record`
|
||||
WHERE comment_doctype='My Company'
|
||||
@ -41,8 +40,7 @@ def get_status_details(arg=None):
|
||||
}
|
||||
return ret
|
||||
|
||||
@webnotes.whitelist()
|
||||
def get_setup_status():
|
||||
def get_setup_status(arg=None):
|
||||
"""
|
||||
Returns the setup status of the current account
|
||||
"""
|
||||
|
@ -104,6 +104,7 @@ def send_welcome_mail(email, args):
|
||||
#
|
||||
# post comment
|
||||
#
|
||||
@webnotes.whitelist()
|
||||
def post_comment(arg):
|
||||
arg = load_json(arg)
|
||||
|
||||
@ -146,6 +147,7 @@ def post_comment(arg):
|
||||
#
|
||||
# update read messages
|
||||
#
|
||||
@webnotes.whitelist()
|
||||
def set_read_all_messages(arg=''):
|
||||
webnotes.conn.sql("""UPDATE `tabComment Widget Record`
|
||||
SET docstatus = 1
|
||||
@ -153,6 +155,7 @@ def set_read_all_messages(arg=''):
|
||||
AND comment_docname = %s
|
||||
""", webnotes.user.name)
|
||||
|
||||
@webnotes.whitelist()
|
||||
def update_security(args=''):
|
||||
import json
|
||||
args = json.loads(args)
|
||||
|
Loading…
x
Reference in New Issue
Block a user