diff options
author | bugreport%peshkin.net <> | 2004-07-12 08:36:42 +0200 |
---|---|---|
committer | bugreport%peshkin.net <> | 2004-07-12 08:36:42 +0200 |
commit | ce983f5d751e61c5500eac45e5db29eee7309520 (patch) | |
tree | 6ad5cbd3cec6177abf3d69e97baa761359885b61 /editusers.cgi | |
parent | f5b60b13b9ebe135498421680b8d7b0166d6cb36 (diff) | |
download | bugzilla-ce983f5d751e61c5500eac45e5db29eee7309520.tar.gz bugzilla-ce983f5d751e61c5500eac45e5db29eee7309520.tar.xz |
Bug 241900: Allow Bugzilla::Auth to have multiple login and validation styles
patch by erik
r=joel
a=justdave
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-x | editusers.cgi | 23 |
1 files changed, 4 insertions, 19 deletions
diff --git a/editusers.cgi b/editusers.cgi index 826bb4b34..fa3efbf8f 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -23,6 +23,7 @@ # Joe Robins <jmrobins@tgix.com> # Dan Mosedale <dmose@mozilla.org> # Joel Peshkin <bugreport@peshkin.net> +# Erik Stambaugh <erik@dasbistro.com> # # Direct any questions on this source code to # @@ -114,15 +115,11 @@ sub EmitFormElements ($$$$) if ($editall) { print "</TR><TR>\n"; print " <TH ALIGN=\"right\">Password:</TH>\n"; - if(!Bugzilla::Auth->can_edit) { - print " <TD><FONT COLOR=RED>This site's authentication method does not allow password changes through Bugzilla!</FONT></TD>\n"; - } else { print qq| <TD><INPUT TYPE="PASSWORD" SIZE="16" MAXLENGTH="16" NAME="password" VALUE=""><br> (enter new password to change) </TD> |; - } print "</TR><TR>\n"; print " <TH ALIGN=\"right\">Disable text:</TH>\n"; @@ -209,7 +206,7 @@ sub EmitFormElements ($$$$) sub PutTrailer (@) { my (@links) = ("Back to the <a href=\"./\">index</a>"); - if($editall && Bugzilla::Auth->can_edit) { + if($editall) { push(@links, "<a href=\"editusers.cgi?action=add\">add</a> a new user"); } @@ -361,7 +358,7 @@ if ($action eq 'list') { } print "</TR>"; } - if ($editall && Bugzilla::Auth->can_edit) { + if ($editall) { print "<TR>\n"; my $span = $candelete ? 3 : 2; print qq{ @@ -395,12 +392,6 @@ if ($action eq 'add') { exit; } - if(!Bugzilla::Auth->can_edit) { - print "The authentication mechanism you are using does not permit accounts to be created from Bugzilla"; - PutTrailer(); - exit; - } - print "<FORM METHOD=POST ACTION=editusers.cgi>\n"; print "<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=0><TR>\n"; @@ -432,12 +423,6 @@ if ($action eq 'new') { exit; } - if (!Bugzilla::Auth->can_edit) { - print "This site's authentication mechanism does not allow new users to be added."; - PutTrailer(); - exit; - } - # Cleanups and valididy checks my $realname = trim($::FORM{realname} || ''); # We don't trim the password since that could falsely lead the user @@ -814,7 +799,7 @@ if ($action eq 'update') { # Update the database with the user's new password if they changed it. - if ( Bugzilla::Auth->can_edit && $editall && $password ) { + if ( $editall && $password ) { my $passworderror = ValidatePassword($password); if ( !$passworderror ) { my $cryptpassword = SqlQuote(Crypt($password)); |