@@ -59,13 +59,6 @@ def send(messages: str, site_name: str):
5959 if not frappe .db .exists ('RC Site' , site_name ):
6060 frappe .throw (_ ("Site not created for the user" ))
6161
62- roles = frappe .get_roles ()
63- if "System Manager" not in roles or "Administrator" not in roles :
64- # check if user has permission to send notifications to this site
65- if not frappe .db .exists ('RC Site User' , {'site' : site_name , 'user_id' : frappe .session .user }):
66- frappe .throw (_ ("You do not have permission to send notifications to this site." ))
67-
68-
6962 if isinstance (messages , str ):
7063 messages = json .loads (messages )
7164
@@ -236,12 +229,6 @@ def send_to_users(messages: str, site_name: str):
236229 if not frappe .db .exists ('RC Site' , site_name ):
237230 frappe .throw (_ ("Site not registered on Raven Cloud, please ask your System Manager to register the site." ))
238231
239- roles = frappe .get_roles ()
240- if "System Manager" not in roles or "Administrator" not in roles :
241- # check if user has permission to send notifications to this site
242- if not frappe .db .exists ('RC Site User' , {'site' : site_name , 'user_id' : frappe .session .user }):
243- frappe .throw (_ ("You do not have permission to send notifications to this site." ))
244-
245232 if isinstance (messages , str ):
246233 messages = json .loads (messages )
247234
0 commit comments