Archived
1
0

Various old fixes

This commit is contained in:
Mercier Pierre-Olivier 2013-09-12 12:58:10 +02:00
parent fd15ae2f37
commit cdb5874aab
2 changed files with 14 additions and 6 deletions

View File

@ -338,10 +338,16 @@ sub get_rights($)
scope => "sub"
);
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')) {
push @rights, Right->new($r);
for my $entry ($mesg->entries) {
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->count != 1) { die "User $login not found or multiple presence"; }
for my $r ($mesg->entry(0)->get_value('intraRight')) {
push @rights, Right->new($r);
for my $entry ($mesg->entries) {
for my $r ($entry->get_value('intraRight')) {
push @rights, Right->new($r);
}
}

View File

@ -4,7 +4,7 @@ use v5.10.1;
use strict;
use warnings;
use lib "../";
use lib "../../";
use ACU::API::Base;
use ACU::API::Projects;