Commit dbc2dbea by Őry Máté

vm: use EnsureAgentMixin in PasswordResetOperation

parent dea750e2
...@@ -922,14 +922,13 @@ class EnsureAgentMixin(object): ...@@ -922,14 +922,13 @@ class EnsureAgentMixin(object):
raise self.instance.NoAgentError(self.instance) raise self.instance.NoAgentError(self.instance)
class PasswordResetOperation(InstanceOperation): class PasswordResetOperation(EnsureAgentMixin, InstanceOperation):
activity_code_suffix = 'Password reset' activity_code_suffix = 'password_reset'
id = 'password_reset' id = 'password_reset'
name = _("password reset") name = _("password reset")
description = _("Password reset") description = _("Password reset")
acl_level = "owner" acl_level = "owner"
required_perms = () required_perms = ()
accept_states = ('RUNNING', )
def _operation(self): def _operation(self):
self.instance.pw = pwgen() self.instance.pw = pwgen()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment