Purge admin and duplicate name in RO liste

master
Heuzef 7 years ago
parent 5f8838a351
commit 091015f9d7
  1. 11
      report_acl.pl

@ -111,10 +111,17 @@ foreach my $share ($a->get_all_by_prop(type => 'share')) {
} }
} }
# Affichage du resultat sous forme d'un tableau : # Affichage du resultat sous forme d'un tableau avec retrait des doublons :
my @list_rw_uniq = uniq(@list_rw); my @list_rw_uniq = uniq(@list_rw);
my @list_ro_uniq = uniq(@list_ro); my @list_ro_uniq = uniq(@list_ro);
# Suppression de l'utilisateur "admin" de la liste RW :
foreach my $u (@list_rw_uniq) { @list_rw_uniq = grep { $_ ne "admin" } @list_rw_uniq; }
# Suppression de l'utilisateur "admin" de la liste RO :
foreach my $u (@list_ro_uniq) { @list_ro_uniq = grep { $_ ne "admin" } @list_ro_uniq; }
# Si l'utilisateur est déjà présent dans la liste RW, alors on le supprime de la liste RO :
foreach my $u (@list_rw_uniq) { @list_ro_uniq = grep { $_ ne $u } @list_ro_uniq; }
print "^ " . $name . " (" . $desc . ") | "; print "^ " . $name . " (" . $desc . ") | ";
foreach (@list_rw_uniq) { print "$_" . "\\\\ "; } foreach (@list_rw_uniq) { print "$_" . "\\\\ "; }
print " | "; print " | ";
@ -176,6 +183,7 @@ foreach my $users (@users) {
} }
} }
} }
# Affiche du resultat :
my @list_sf_rw = uniq(@list_sf_rw); my @list_sf_rw = uniq(@list_sf_rw);
foreach (@list_sf_rw) { print "$_" . "\\\\ "; } foreach (@list_sf_rw) { print "$_" . "\\\\ "; }
} }
@ -214,6 +222,7 @@ foreach my $users (@users) {
} }
} }
} }
# Affiche du resultat :
my @list_sf_ro = uniq(@list_sf_ro); my @list_sf_ro = uniq(@list_sf_ro);
foreach (@list_sf_ro) { print "$_" . "\\\\ "; } foreach (@list_sf_ro) { print "$_" . "\\\\ "; }
} }

Loading…
Cancel
Save