فهرست منبع

HUE-8758 [auth] Fix some wrong styling indentation

Romain 5 سال پیش
والد
کامیت
fbf2dad8ff
1فایلهای تغییر یافته به همراه13 افزوده شده و 13 حذف شده
  1. 13 13
      desktop/core/src/desktop/auth/forms.py

+ 13 - 13
desktop/core/src/desktop/auth/forms.py

@@ -145,21 +145,21 @@ class OrganizationAuthenticationForm(Form):
     return self.cleaned_data
 
   def confirm_login_allowed(self, user):
-        """
-        Controls whether the given User may log in. This is a policy setting,
-        independent of end-user authentication. This default behavior is to
-        allow login by active users, and reject login by inactive users.
+    """
+    Controls whether the given User may log in. This is a policy setting,
+    independent of end-user authentication. This default behavior is to
+    allow login by active users, and reject login by inactive users.
 
-        If the given user cannot log in, this method should raise a
-        ``forms.ValidationError``.
+    If the given user cannot log in, this method should raise a
+    ``forms.ValidationError``.
 
-        If the given user may log in, this method should return None.
-        """
-        if not user.is_active:
-            raise ValidationError(
-                self.error_messages['inactive'],
-                code='inactive',
-            )
+    If the given user may log in, this method should return None.
+    """
+    if not user.is_active:
+        raise ValidationError(
+            self.error_messages['inactive'],
+            code='inactive',
+        )
 
   def get_user(self):
       return self.user_cache