Forward port graceful handling of the deletion of the Auth LDAPLink.
This commit is contained in:
parent
fa04344b7d
commit
5381f3038d
6 changed files with 111 additions and 70 deletions
|
|
@ -158,7 +158,14 @@ Deletes the requested LDAP Link in the form variable C<llid>. Returns the user
|
|||
sub www_deleteLDAPLink {
|
||||
my $session = shift;
|
||||
return $session->privilege->insufficient unless canView($session);
|
||||
$session->db->write("delete from ldapLink where ldapLinkId=".$session->db->quote($session->form->process("llid")));
|
||||
my $llid = $session->form->process("llid");
|
||||
if ($llid) {
|
||||
$session->db->write("delete from ldapLink where ldapLinkId=?", [$llid]);
|
||||
}
|
||||
if ($llid eq $session->setting->get('ldapConnection')) {
|
||||
$session->log->warn(sprintf 'user %s deleted the LDAP connection used for user authentication', $session->user->username);
|
||||
$session->setting->set('ldapConnection', '');
|
||||
}
|
||||
return www_listLDAPLinks($session);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -385,9 +385,11 @@ sub www_editUser {
|
|||
-value=>$u->authMethod,
|
||||
);
|
||||
foreach (@{$session->config->get("authMethods")}) {
|
||||
$tabform->getTab("account")->fieldSetStart($_);
|
||||
my $authInstance = WebGUI::Operation::Auth::getInstance($session,$_,$u->userId);
|
||||
$tabform->getTab("account")->raw($authInstance->editUserForm);
|
||||
my $editUserForm = $authInstance->editUserForm;
|
||||
next unless $editUserForm;
|
||||
$tabform->getTab("account")->fieldSetStart($_);
|
||||
$tabform->getTab("account")->raw($editUserForm);
|
||||
$tabform->getTab("account")->fieldSetEnd;
|
||||
}
|
||||
foreach my $category (@{WebGUI::ProfileCategory->getCategories($session)}) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue