Commit ae8628c0 authored by Francesc Guasch's avatar Francesc Guasch
Browse files

merged changes picked from release 0.3.2

parent c74d9534
......@@ -2375,7 +2375,8 @@ sub _cmd_prepare_base {
my $id_domain = $request->id_domain or confess "Missing request id_domain";
my $uid = $request->args('uid') or confess "Missing argument uid";
my $user = Ravada::Auth::SQL->search_by_id( $uid);
my $user = Ravada::Auth::SQL->search_by_id( $uid)
or confess "Error: Unknown user id $uid in request ".Dumper($request);
my $domain = $self->search_domain_by_id($id_domain);
......
......@@ -1171,11 +1171,6 @@ sub _remove_domain_cascade($self,$user, $cascade = 1) {
my $domain = $vm->search_domain($domain_name) or next;
$domain->remove($user, $cascade);
}
return if !$self->{_data}->{id};
my $sth = $$CONNECTOR->dbh->prepare("DELETE FROM access_ldap_attribute"
." WHERE id_domain=?");
$sth->execute($self->id);
$sth->finish;
}
sub _remove_access_attributes_db($self) {
......
......@@ -5,5 +5,6 @@ CREATE TABLE `access_ldap_attribute` (
, `value` varchar(64)
, `allowed` integer not null default 1
, `n_order` integer not null default 1
, `last` integer not null default 1
, UNIQUE (`id_domain`,`attribute`,`value`)
);
......@@ -1206,7 +1206,8 @@ sub connector {
return $connector;
}
sub END {
# this must be in DESTROY because users got removed in END
sub DESTROY {
remove_old_user() if $CONNECTOR;
remove_old_user_ldap() if $CONNECTOR;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment