in ees_microsoft_outlook/sync_microsoft_outlook.py [0:0]
def map_ms_outlook_user_to_ws_user(self, user, permissions):
"""This method is used to map the Microsoft Outlook user to Workplace Search
user and responsible to call the user permissions indexer method
:param user: User for indexing the permissions
:param permissions: User permissions
"""
rows = {}
mapping_sheet_path = self.config.get_value("connector.user_mapping")
if mapping_sheet_path and os.path.exists(mapping_sheet_path) and os.path.getsize(mapping_sheet_path) > 0:
with open(mapping_sheet_path, encoding="UTF-8") as file:
csvreader = csv.reader(file)
for row in csvreader:
rows[row[0]] = row[1]
user_name = rows.get(user, user)
self.workplace_add_permission(user_name, permissions)