brotherton-erpnext/patches/july_2012/blog_guest_permission.py
2012-09-24 19:13:42 +05:30

13 lines
339 B
Python

from __future__ import unicode_literals
def execute():
"""allocate read write permission to guest for doctype 'Blog'"""
import webnotes
webnotes.conn.sql("""delete from `tabDocPerm` where parent = 'Blog'""")
webnotes.conn.commit()
import webnotes.model.sync
webnotes.model.sync.sync('website', 'blog', 1)
webnotes.conn.begin()