def get_shared_doctypes(user=None):
 if (not user):
  user = frappe.session.user
 return frappe.db.sql_list(u'select distinct share_doctype from tabDocShare where (user=%s or everyone=1)', user)

def get_shared_doctypes ( user = None ) : if ( not user ) : user = frappe . session . user return frappe . db . sql_list ( u'select distinct share_doctype from tabDocShare where (user=%s or everyone=1)' , user )
return list of doctypes in which documents are shared for the given user .