Skip to content

Commit af3b565

Browse files
aaunario-keepersk-keeper
authored andcommitted
compliance-report: added 'shared_folder_uid' column
1 parent 3a90c85 commit af3b565

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

keepercommander/commands/compliance.py

+4-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ def execute(self, params, **kwargs): # type: (KeeperParams, any) -> any
161161

162162
class ComplianceReportCommand(BaseComplianceReportCommand):
163163
def __init__(self):
164-
headers = ['record_uid', 'title', 'type', 'username', 'permissions', 'url', 'in_trash']
164+
headers = ['record_uid', 'title', 'type', 'username', 'permissions', 'url', 'in_trash', 'shared_folder_uid']
165165
super(ComplianceReportCommand, self).__init__(headers, allow_no_opts=False)
166166

167167
def get_parser(self): # type: () -> Optional[argparse.ArgumentParser]
@@ -200,6 +200,7 @@ def show_help_text(self, local_data): # type: (sox.sox_data.SoxData) -> None
200200
logging.info(help_txt)
201201

202202
def generate_report_data(self, params, kwargs, sox_data, report_fmt, node, root_node):
203+
# type: (KeeperParams, Dict[str, Any], SoxData, str, int, int) -> List[List[Union[str, Any]]]
203204
def filter_owners(rec_owners):
204205
def filter_by_teams(users, teams):
205206
enterprise_teams = params.enterprise.get('teams', [])
@@ -296,10 +297,11 @@ def format_table(rows):
296297
r_title = r_data.get('title', '')
297298
r_type = r_data.get('record_type', '')
298299
r_url = r_data.get('url', '')
300+
rec_sfs = sox_data.get_record_sfs(rec_uid)
299301
formatted_rec_uid = rec_uid if report_fmt != 'table' or last_rec_uid != rec_uid else ''
300302
u_email = row.get('email')
301303
permissions = RecordPermissions.to_permissions_str(row.get('permissions'))
302-
fmt_row = [formatted_rec_uid, r_title, r_type, u_email, permissions, r_url.rstrip('/'), rec.in_trash]
304+
fmt_row = [formatted_rec_uid, r_title, r_type, u_email, permissions, r_url.rstrip('/'), rec.in_trash, rec_sfs]
303305
formatted_rows.append(fmt_row)
304306
last_rec_uid = rec_uid
305307
return formatted_rows

0 commit comments

Comments
 (0)