compliance-reporting validation fix: enable compliance-reporting on all MCs for MSP admins
@@ -36,6 +36,7 @@ def is_compliance_reporting_enabled(params):
if addon is None:
return False
+ if not params.msp_tree_key:
role_privilege = 'run_compliance_reports'
username = params.user
users = enterprise.get('users')
@@ -45,6 +46,8 @@ def is_compliance_reporting_enabled(params):
r_privileges = enterprise.get('role_privileges')
p_key = 'privilege'
return any([rp for rp in r_privileges if rp.get('role_id') in r_ids and rp.get(p_key) == role_privilege])
+ else:
+ return True
def get_prelim_data(params, enterprise_id=0, rebuild=False, min_updated=0, cache_only=False, no_cache=False):
