Skip to content

Commit

Permalink
Release 17.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sk-keeper committed Jan 31, 2025
1 parent ad5246d commit 4b49a7d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion keepercommander/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@
# Contact: [email protected]
#

__version__ = '17.0.5'
__version__ = '17.0.6'
5 changes: 4 additions & 1 deletion keepercommander/commands/discoveryrotation.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,8 @@ class PAMCreateRecordRotationCommand(Command):
'5:56PM UTC enter following cron -sc "56 17 * * *"')
schedule_group.add_argument('--on-demand', '-od', required=False, dest='on_demand',
action='store_true', help='Schedule On Demand')
schedule_group.add_argument('--schedule-config', '-sf', required=False, dest='schedule_config',
action='store_true', help='Schedule from Configuration')
parser.add_argument('--complexity', '-x', required=False, dest='pwd_complexity', action='store',
help='Password complexity: length, upper, lower, digits, symbols. Ex. 32,5,5,5,5')
parser.add_argument('--admin-user', '-a', required=False, dest='admin', action='store',
Expand Down Expand Up @@ -377,6 +379,7 @@ def add_folders(sub_folder): # type: (BaseFolderNode) -> None
schedule_json_data = kwargs.get('schedule_json_data')
schedule_cron_data = kwargs.get('schedule_cron_data') # See this page for more details: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html#examples
schedule_on_demand = kwargs.get('on_demand') is True
schedule_config = kwargs.get('schedule_config') is True
schedule_data = None # type: Optional[List]
if isinstance(schedule_json_data, list):
schedule_data = [json.loads(x) for x in schedule_json_data]
Expand Down Expand Up @@ -500,7 +503,7 @@ def config_iam_aad_user(_dag, target_record, target_iam_aad_config_uid):
# 2. Schedule
record_schedule_data = schedule_data
if record_schedule_data is None:
if current_record_rotation:
if current_record_rotation and not schedule_config:
try:
current_schedule = current_record_rotation.get('schedule')
if current_schedule:
Expand Down
4 changes: 3 additions & 1 deletion keepercommander/commands/discoveryrotation_v1.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ class PAMCreateRecordRotationCommand(Command):
schedule_group.add_argument('--schedulejson', '-sj', required=False, dest='schedule_json_data', action='append', help='Json of the scheduler. Example: -sj \'{"type": "WEEKLY", "utcTime": "15:44", "weekday": "SUNDAY", "intervalCount": 1}\'')
schedule_group.add_argument('--schedulecron', '-sc', required=False, dest='schedule_cron_data', action='append', help='Cron tab string of the scheduler. Example: to run job daily at 5:56PM UTC enter following cron -sc "56 17 * * *"')
schedule_group.add_argument('--on-demand', '-sm', required=False, dest='on_demand', action='store_true', help='Schedule On Demand')
schedule_group.add_argument('--schedule-config', '-sf', required=False, dest='schedule_config', action='store_true', help='Schedule from Configuration')
parser.add_argument('--complexity', '-x', required=False, dest='pwd_complexity', action='store', help='Password complexity: length, upper, lower, digits, symbols. Ex. 32,5,5,5,5')
state_group = parser.add_mutually_exclusive_group()
state_group.add_argument('--enable', dest='enable', action='store_true', help='Enable rotation')
Expand Down Expand Up @@ -245,6 +246,7 @@ def add_folders(sub_folder): # type: (BaseFolderNode) -> None
schedule_json_data = kwargs.get('schedule_json_data')
schedule_cron_data = kwargs.get('schedule_cron_data') # See this page for more details: http://www.quartz-scheduler.org/documentation/quartz-2.3.0/tutorials/crontrigger.html#examples
schedule_on_demand = kwargs.get('on_demand') is True
schedule_config = kwargs.get('schedule_config') is True
schedule_data = None # type: Optional[List]
if isinstance(schedule_json_data, list):
schedule_data = [json.loads(x) for x in schedule_json_data]
Expand Down Expand Up @@ -320,7 +322,7 @@ def add_folders(sub_folder): # type: (BaseFolderNode) -> None
# 2. Schedule
record_schedule_data = schedule_data
if record_schedule_data is None:
if current_record_rotation:
if current_record_rotation and not schedule_config:
try:
current_schedule = current_record_rotation.get('schedule')
if current_schedule:
Expand Down
9 changes: 9 additions & 0 deletions keepercommander/commands/record.py
Original file line number Diff line number Diff line change
Expand Up @@ -1779,6 +1779,15 @@ def execute(self, params, **kwargs):
continue
records.append(r)

if len(records) > 1:
try:
pattern = re.compile(record_name, re.IGNORECASE).search
exact_title = [x for x in records if pattern(x.title)]
if len(exact_title) == 1:
records = exact_title
except:
pass

if len(records) == 1:
if kwargs['output'] == 'clipboard':
logging.info('Record Title: %s', records[0].title)
Expand Down

0 comments on commit 4b49a7d

Please sign in to comment.