From 681ce77bc0dc5828eae2bb48471db9e373437e4b Mon Sep 17 00:00:00 2001 From: "bbaetz%acm.org" <> Date: Sat, 22 Mar 2003 12:47:09 +0000 Subject: Bug 180642 - Move authentication code into a module r=gerv, justdave a=justdave --- editusers.cgi | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) (limited to 'editusers.cgi') 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 "\n"; print " Password:\n"; - if(Param('useLDAP')) { - print " This site is using LDAP for authentication!\n"; + if(!Bugzilla::Auth->can_edit) { + print " This site's authentication method does not allow password changes through Bugzilla!\n"; } else { print qq|
@@ -357,7 +357,7 @@ if ($action eq 'list') { } print ""; } - if ($editall && !Param('useLDAP')) { + if ($editall && Bugzilla::Auth->can_edit) { print "\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)); -- cgit v1.2.3-24-g4f1b