MCPcopy Create free account
hub / github.com/pgadmin-org/pgadmin4 / is_locked

Method is_locked

web/pgadmin/model/__init__.py:223–235  ·  view source on GitHub ↗
(self, form_error=None)

Source from the content-addressed store, hash-verified

221 return self.active and not self.locked
222
223 def is_locked(self, form_error=None):
224 # Flask-Security's LoginForm.validate() calls this after password
225 # verification and treats the return value inverted: True means
226 # "not locked, proceed"; False means "locked, fail validation".
227 # The default UserMixin.is_locked unconditionally returns True,
228 # which is what allows the /login bypass on a locked account.
229 if self.locked:
230 if form_error is not None:
231 form_error.append(gettext(
232 'Your account is locked. Please contact the '
233 'Administrator.'))
234 return False
235 return True
236
237
238class Setting(db.Model, UserScopedMixin):

Callers 1

runTestMethod · 0.95

Calls 2

gettextFunction · 0.85
appendMethod · 0.80

Tested by 1

runTestMethod · 0.76