diff options
author | bbaetz%acm.org <> | 2003-03-22 13:47:09 +0100 |
---|---|---|
committer | bbaetz%acm.org <> | 2003-03-22 13:47:09 +0100 |
commit | 681ce77bc0dc5828eae2bb48471db9e373437e4b (patch) | |
tree | a7c8ba0b1e070ea489c96246eca65fc7c36f6235 /editusers.cgi | |
parent | 3f1f4e57809b2e3f42e637a86646e806470faec5 (diff) | |
download | bugzilla-681ce77bc0dc5828eae2bb48471db9e373437e4b.tar.gz bugzilla-681ce77bc0dc5828eae2bb48471db9e373437e4b.tar.xz |
Bug 180642 - Move authentication code into a module
r=gerv, justdave
a=justdave
Diffstat (limited to 'editusers.cgi')
-rwxr-xr-x | editusers.cgi | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/editusers.cgi b/editusers.cgi index cc6be6665..fee00a4e0 100755 --- a/editusers.cgi +++ b/editusers.cgi @@ -110,8 +110,8 @@ sub EmitFormElements ($$$$) if ($editall) { print "</TR><TR>\n"; print " <TH ALIGN=\"right\">Password:</TH>\n"; - if(Param('useLDAP')) { - print " <TD><FONT COLOR=RED>This site is using LDAP for authentication!</FONT></TD>\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> @@ -357,7 +357,7 @@ if ($action eq 'list') { } print "</TR>"; } - if ($editall && !Param('useLDAP')) { + if ($editall && Bugzilla::Auth->can_edit) { print "<TR>\n"; my $span = $candelete ? 3 : 2; print qq{ @@ -391,9 +391,8 @@ if ($action eq 'add') { exit; } - if(Param('useLDAP')) { - print "This site is using LDAP for authentication. To add a new user, "; - print "please contact the LDAP administrators."; + if(!Bugzilla::Auth->can_edit) { + print "The authentication mechanism you are using does not permit accounts to be created from Bugzilla"; PutTrailer(); exit; } @@ -429,9 +428,8 @@ if ($action eq 'new') { exit; } - if(Param('useLDAP')) { - print "This site is using LDAP for authentication. To add a new user, "; - print "please contact the LDAP administrators."; + if (!Bugzilla::Auth->can_edit) { + print "This site's authentication mechanism does not allow new users to be added."; PutTrailer(); exit; } @@ -791,7 +789,7 @@ if ($action eq 'update') { # Update the database with the user's new password if they changed it. - if ( !Param('useLDAP') && $editall && $password ) { + if ( Bugzilla::Auth->can_edit && $editall && $password ) { my $passworderror = ValidatePassword($password); if ( !$passworderror ) { my $cryptpassword = SqlQuote(Crypt($password)); |