Skip to content
Snippets Groups Projects
Verified Commit a4a4313d authored by Marcin Sobczyk's avatar Marcin Sobczyk Committed by Mateusz Żebrak
Browse files

Allow creating profile only when clive is locked

Creating profile unlocks it automatically
We assume that only one profile can be unlocked.
parent eb52f29f
No related branches found
No related tags found
3 merge requests!524v1.27.5.19 Release,!501Implement clive unlock/lock and use in docker entrypoint script,!496Draft: Msobczyk/encrypt profile
...@@ -31,6 +31,10 @@ class CreateProfile(BeekeeperBasedCommand): ...@@ -31,6 +31,10 @@ class CreateProfile(BeekeeperBasedCommand):
f"Can't use this password: {humanize_validation_result(password_result)}", errno.EINVAL f"Can't use this password: {humanize_validation_result(password_result)}", errno.EINVAL
) )
async def validate_inside_context_manager(self) -> None:
await self.validate_session_is_locked()
await super().validate_inside_context_manager()
async def _run(self) -> None: async def _run(self) -> None:
profile = Profile.create(self.profile_name, self.working_account_name) profile = Profile.create(self.profile_name, self.working_account_name)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment