added whitelist check

This commit is contained in:
Rushabh Mehta
2012-02-13 16:50:52 +05:30
parent ff0946bbda
commit f17ce7bc67
20 changed files with 38 additions and 160 deletions

View File

@@ -1,4 +1,6 @@
import webnotes
@webnotes.whitelist()
def subscribe(arg):
"""subscribe to blog (blog_subscriber)"""
if webnotes.conn.sql("""select name from `tabBlog Subscriber` where name=%s""", arg):

View File

@@ -1,5 +1,6 @@
import json, webnotes
@webnotes.whitelist()
def send(args):
"""create support ticket"""
args = json.loads(args)

View File

@@ -1,6 +1,8 @@
import webnotes
@webnotes.whitelist()
def unsubscribe(arg):
"""unsubscribe from lists"""
import webnotes
lists = [['Blog Subscriber', 'name']]
for l in lists:
webnotes.conn.sql("""delete from `tab%s` where %s=%s""" % (l[0], l[1], '%s'), arg)