fix in profile permissions and support ticket response should update modified datetime
diff --git a/erpnext/patches/may_2012/profile_perm_patch.py b/erpnext/patches/may_2012/profile_perm_patch.py
new file mode 100644
index 0000000..fe24787
--- /dev/null
+++ b/erpnext/patches/may_2012/profile_perm_patch.py
@@ -0,0 +1,22 @@
+def execute():
+	"""Make profile readonly for role All"""
+	import webnotes.model.doc
+	webnotes.conn.sql("delete from `tabDocPerm` where parent='Profile' and role='All'")
+	new_perms = [
+		{
+			'parent': 'Profile',
+			'parentfield': 'permissions',
+			'parenttype': 'DocType',
+			'role': 'All',			
+			'permlevel': 0,
+			'read': 1,
+		},
+	]
+	for perms in new_perms:
+		doc = webnotes.model.doc.Document('DocPerm')
+		doc.fields.update(perms)
+		doc.save()
+	webnotes.conn.commit()
+	webnotes.conn.begin()
+	import webnotes.model.sync
+	webnotes.model.sync.sync('core', 'profile')
\ No newline at end of file
diff --git a/erpnext/patches/patch_list.py b/erpnext/patches/patch_list.py
index 13a411c..f8738e5 100644
--- a/erpnext/patches/patch_list.py
+++ b/erpnext/patches/patch_list.py
@@ -397,4 +397,9 @@
 		'patch_file': 'reload_customer_address_contact',
 		'description': 'Reload report customer address contact'
 	},
+	{
+		'patch_module': 'patches.may_2012',
+		'patch_file': 'profile_perm_patch',
+		'description': 'Make profile readonly for role All'
+	},
 ]
\ No newline at end of file
diff --git a/erpnext/support/doctype/support_ticket/__init__.py b/erpnext/support/doctype/support_ticket/__init__.py
index ed42d2b..d2dbe60 100644
--- a/erpnext/support/doctype/support_ticket/__init__.py
+++ b/erpnext/support/doctype/support_ticket/__init__.py
@@ -79,7 +79,12 @@
 				
 				st = get_obj('Support Ticket', thread_id)
 				st.make_response_record(content, mail.mail['From'], content_type)
-				webnotes.conn.set(st.doc, 'status', 'Open')
+				
+				# to update modified date
+				#webnotes.conn.set(st.doc, 'status', 'Open')
+				st.doc.status = 'Open'
+				st.doc.save()
+				
 				update_feed(st.doc, 'on_update')
 				webnotes.conn.commit()
 				# extract attachments