summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Constants.pm
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2006-05-08 05:13:47 +0200
committerlpsolit%gmail.com <>2006-05-08 05:13:47 +0200
commitece3a7ec4685b281efee69286a4dbdeb44971661 (patch)
treea7cf408860ea24421ded09f46dc4d680cc5f19fa /Bugzilla/Constants.pm
parent46c78a8c7c42bfdf47ee1f68939aa122371b9662 (diff)
downloadbugzilla-ece3a7ec4685b281efee69286a4dbdeb44971661.tar.gz
bugzilla-ece3a7ec4685b281efee69286a4dbdeb44971661.tar.xz
Bug 332598: Move ValidatePassword() and DBNameToIdAndCheck() from globals.pl into User.pm - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=myk
Diffstat (limited to 'Bugzilla/Constants.pm')
-rw-r--r--Bugzilla/Constants.pm12
1 files changed, 12 insertions, 0 deletions
diff --git a/Bugzilla/Constants.pm b/Bugzilla/Constants.pm
index 0b612cbba..8e245d0b6 100644
--- a/Bugzilla/Constants.pm
+++ b/Bugzilla/Constants.pm
@@ -44,6 +44,9 @@ use base qw(Exporter);
AUTH_LOGINFAILED
AUTH_DISABLED
+ USER_PASSWORD_MIN_LENGTH
+ USER_PASSWORD_MAX_LENGTH
+
LOGIN_OPTIONAL
LOGIN_NORMAL
LOGIN_REQUIRED
@@ -71,6 +74,7 @@ use base qw(Exporter);
COMMENT_COLS
UNLOCK_ABORT
+ THROW_ERROR
RELATIONSHIPS
REL_ASSIGNEE REL_QA REL_REPORTER REL_CC REL_VOTER
@@ -141,6 +145,10 @@ use constant AUTH_ERROR => 2;
use constant AUTH_LOGINFAILED => 3;
use constant AUTH_DISABLED => 4;
+# The minimum and maximum lengths a password must have.
+use constant USER_PASSWORD_MIN_LENGTH => 3;
+use constant USER_PASSWORD_MAX_LENGTH => 16;
+
use constant LOGIN_OPTIONAL => 0;
use constant LOGIN_NORMAL => 1;
use constant LOGIN_REQUIRED => 2;
@@ -192,6 +200,10 @@ use constant COMMENT_COLS => 80;
# because of error
use constant UNLOCK_ABORT => 1;
+# Determine whether a validation routine should return 0 or throw
+# an error when the validation fails.
+use constant THROW_ERROR => 1;
+
use constant REL_ASSIGNEE => 0;
use constant REL_QA => 1;
use constant REL_REPORTER => 2;