Various old fixes
This commit is contained in:
parent
fd15ae2f37
commit
cdb5874aab
18
ACU/LDAP.pm
18
ACU/LDAP.pm
@ -338,10 +338,16 @@ sub get_rights($)
|
|||||||
scope => "sub"
|
scope => "sub"
|
||||||
);
|
);
|
||||||
if ($mesg->code != 0) { die $mesg->error; }
|
if ($mesg->code != 0) { die $mesg->error; }
|
||||||
if ($mesg->count != 1) { die "User $login not found or multiple presence"; }
|
|
||||||
|
|
||||||
for my $r ($mesg->entry(0)->get_value('intraRight')) {
|
for my $entry ($mesg->entries) {
|
||||||
push @rights, Right->new($r);
|
for my $r ($entry->get_value('intraRight')) {
|
||||||
|
if ($r =~ /^!(.*)$/) {
|
||||||
|
@rights = grep { ! /^\Q$r\E$/ } @rights;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
push @rights, Right->new($r);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -354,8 +360,10 @@ sub get_rights($)
|
|||||||
if ($mesg->code != 0) { die $mesg->error; }
|
if ($mesg->code != 0) { die $mesg->error; }
|
||||||
if ($mesg->count != 1) { die "User $login not found or multiple presence"; }
|
if ($mesg->count != 1) { die "User $login not found or multiple presence"; }
|
||||||
|
|
||||||
for my $r ($mesg->entry(0)->get_value('intraRight')) {
|
for my $entry ($mesg->entries) {
|
||||||
push @rights, Right->new($r);
|
for my $r ($entry->get_value('intraRight')) {
|
||||||
|
push @rights, Right->new($r);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ use v5.10.1;
|
|||||||
use strict;
|
use strict;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use lib "../";
|
use lib "../../";
|
||||||
|
|
||||||
use ACU::API::Base;
|
use ACU::API::Base;
|
||||||
use ACU::API::Projects;
|
use ACU::API::Projects;
|
||||||
|
Reference in New Issue
Block a user