From 7a0b68460a31ec5441ef9004b19fc63f08eb1240 Mon Sep 17 00:00:00 2001 From: sshrushanth-ks Date: Tue, 5 May 2026 17:14:29 +0530 Subject: [PATCH 1/2] Fix: remove mandatory collection filter requirement on EPM policy creation UserCheck, MachineCheck, and ApplicationCheck already default to ['*'] when not provided, so forcing users to explicitly pass --user-filter, --machine-filter, and --app-filter was unnecessary. Co-authored-by: Cursor --- keepercommander/commands/pedm/pedm_admin.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/keepercommander/commands/pedm/pedm_admin.py b/keepercommander/commands/pedm/pedm_admin.py index d2e0b0662..7ce563954 100644 --- a/keepercommander/commands/pedm/pedm_admin.py +++ b/keepercommander/commands/pedm/pedm_admin.py @@ -1442,14 +1442,6 @@ def execute(self, context: KeeperParams, **kwargs) -> None: if policy_filter: policy_data.update(policy_filter) - if policy_type in ('PrivilegeElevation', 'FileAccess', 'CommandLine'): - missing = [name for name, key in (('user', 'UserCheck'), ('machine', 'MachineCheck'), ('application', 'ApplicationCheck')) - if not policy_filter.get(key)] - if missing: - raise base.CommandError( - f'At least one machine, application, and user collection required to save this policy type. ' - f'Missing: {", ".join(missing)}. Use --user-filter, --machine-filter, --app-filter.') - for filter_name in ('UserCheck', 'MachineCheck', 'ApplicationCheck', 'DateCheck', 'TimeCheck', 'DayCheck'): f = policy_data.get(filter_name) if f is None: From 405b3699b9fc6d989a198335908b0735d41601c9 Mon Sep 17 00:00:00 2001 From: sshrushanth-ks Date: Tue, 5 May 2026 17:14:38 +0530 Subject: [PATCH 2/2] Fix: default DateCheck, TimeCheck, DayCheck to [] on EPM policy creation Date, Time, and Day filters were being saved as ['*'] when not specified, inconsistent with Admin Console behaviour. These fields now default to [] to match the UI. UserCheck, MachineCheck, and ApplicationCheck remain ['*']. Co-authored-by: Cursor --- keepercommander/commands/pedm/pedm_admin.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/keepercommander/commands/pedm/pedm_admin.py b/keepercommander/commands/pedm/pedm_admin.py index 7ce563954..b201edbd2 100644 --- a/keepercommander/commands/pedm/pedm_admin.py +++ b/keepercommander/commands/pedm/pedm_admin.py @@ -1442,10 +1442,10 @@ def execute(self, context: KeeperParams, **kwargs) -> None: if policy_filter: policy_data.update(policy_filter) - for filter_name in ('UserCheck', 'MachineCheck', 'ApplicationCheck', 'DateCheck', 'TimeCheck', 'DayCheck'): - f = policy_data.get(filter_name) - if f is None: - policy_data[filter_name] = ['*'] + for filter_name, default in (('UserCheck', ['*']), ('MachineCheck', ['*']), ('ApplicationCheck', ['*']), + ('DateCheck', []), ('TimeCheck', []), ('DayCheck', [])): + if policy_data.get(filter_name) is None: + policy_data[filter_name] = default arg_status = kwargs.get('status') if isinstance(arg_status, str):