mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-04 00:44:48 +00:00
perf: Update confirmation backend definitions to use ConfirmType
This commit is contained in:
@@ -2,11 +2,12 @@ from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from authentication.mixins import authenticate
|
||||
from .base import BaseConfirm
|
||||
from ..const import ConfirmType
|
||||
|
||||
|
||||
class ConfirmPassword(BaseConfirm):
|
||||
name = 'password'
|
||||
display_name = _('Password')
|
||||
name = ConfirmType.PASSWORD.value
|
||||
display_name = ConfirmType.PASSWORD.name
|
||||
|
||||
def check(self):
|
||||
return self.user.is_password_authenticate()
|
||||
|
Reference in New Issue
Block a user