Index: trunk/LATMOS-Accounts/bin/la-cli
===================================================================
--- trunk/LATMOS-Accounts/bin/la-cli	(revision 2281)
+++ trunk/LATMOS-Accounts/bin/la-cli	(revision 2282)
@@ -25,4 +25,5 @@
     'no-unexp|wo-unexp' => \my $nounexp,
     'with-unexp'        => \my $unexp,
+    'u|username=s'      => \my $username,
     'help'              => sub { pod2usage(0) },
 ) or pod2usage();
@@ -52,9 +53,13 @@
 Take into account only propagated objects (attribute 'exported'=1) (default)
 
+=item -u|--username USER
+
+Simulated access like user USER is login
+
 =back
 
 =cut
 
-my $LA = LATMOS::Accounts->new($config, noacl => 1);
+my $LA = LATMOS::Accounts->new($config, noacl => $username ? 0 : 1);
 my $labase = $LA->base($base);
 $labase && $labase->load or die "Cannot load base";
Index: trunk/LATMOS-Accounts/bin/la-dump
===================================================================
--- trunk/LATMOS-Accounts/bin/la-dump	(revision 2281)
+++ trunk/LATMOS-Accounts/bin/la-dump	(revision 2282)
@@ -81,5 +81,5 @@
 $otype ||= 'user';
 
-my $LA = LATMOS::Accounts->new($config, noacl => 1);
+my $LA = LATMOS::Accounts->new($config, noacl => $username ? 0 : 1);
 my $labase = $LA->base($base);
 $labase && $labase->load or die "Cannot load base";
Index: trunk/LATMOS-Accounts/bin/la-qacls
===================================================================
--- trunk/LATMOS-Accounts/bin/la-qacls	(revision 2281)
+++ trunk/LATMOS-Accounts/bin/la-qacls	(revision 2282)
@@ -66,5 +66,5 @@
 =cut
 
-my $LA = LATMOS::Accounts->new($config, noacl => 0);
+my $LA = LATMOS::Accounts->new($config, noacl => $user ? 0 : 1);
 
 my $labase = $LA->base($base);
@@ -73,5 +73,5 @@
 
 if ($user) {
-    $labase->{_user} = $user;
+    $labase->SetConnectedUser($user);
 }
 
@@ -85,7 +85,10 @@
 ) foreach(qw(@CREATE @DELETE));
 
-printf("%s%s %s\n",
-    ($labase->check_acl($obj, $_, 'r') ? 'r' : ' '),
-    ($labase->check_acl($obj, $_, 'w') ? 'w' : ' '),
-    $_,
-) foreach($labase->list_canonical_fields($otype, 'a'));
+foreach($labase->list_canonical_fields($otype, 'a')) {
+    my $attr = $labase->attribute($otype, $_);
+    printf("%s%s %s\n",
+        ($attr->readable ? ($labase->check_acl($obj, $_, 'r') ? 'r' : ' ') : '-'),
+        ($attr->ro       ? '-' : ($labase->check_acl($obj, $_, 'w') ? 'w' : ' ')),
+        $_,
+    )
+}
Index: trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Acls.pm
===================================================================
--- trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Acls.pm	(revision 2281)
+++ trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Acls.pm	(revision 2282)
@@ -29,14 +29,16 @@
         }, $class
     );
-    if ($file) {
-        $acls->read_acl_file($file) or return;
-    }
 
     # Default ACLS:
-    $acls->add( '*.log', [ '$uid: read', '*: deny' ] );
+#    $acls->add( '*.log', [ '$uid: read', '*: deny' ] );
     $acls->add(
         'user.{userPasswd,userPassword,encryptedPassword,oldPassword}',
         [ '$uid: write', '*: deny' ],
     );
+
+    if ($file) {
+        $acls->read_acl_file($file) or return;
+    }
+
     $acls
 }
Index: trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm
===================================================================
--- trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm	(revision 2281)
+++ trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases.pm	(revision 2282)
@@ -1185,6 +1185,6 @@
     my ($self, $username) = @_;
 
-    $self->{_user} = $username;
-    la_log(LA_DEBUG, "Connected as $username");
+    $self->{_user} = $username || '';
+    la_log(LA_DEBUG, "Connected as `$username'");
 }
 
Index: trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Objects.pm
===================================================================
--- trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Objects.pm	(revision 2281)
+++ trunk/LATMOS-Accounts/lib/LATMOS/Accounts/Bases/Objects.pm	(revision 2282)
@@ -240,5 +240,5 @@
     my ($self, $cfield) = @_;
     $self->base->check_acl($self, $cfield, 'r') or do {
-        $self->base->log(LA_ERR, "Permission denied to get %s/%s",
+        $self->base->log(LA_DEBUG, "Permission denied to get %s/%s",
             $self->id, $cfield
         );
Index: trunk/LATMOS-Accounts/patchset/logas_in_cli.patch
===================================================================
--- trunk/LATMOS-Accounts/patchset/logas_in_cli.patch	(revision 2282)
+++ trunk/LATMOS-Accounts/patchset/logas_in_cli.patch	(revision 2282)
@@ -0,0 +1,34 @@
+diff --git a/LATMOS-Accounts/lib/LATMOS/Accounts/Cli/Base.pm b/LATMOS-Accounts/lib/LATMOS/Accounts/Cli/Base.pm
+index ddc4ce2..6c36ae7 100644
+--- a/LATMOS-Accounts/lib/LATMOS/Accounts/Cli/Base.pm
++++ b/LATMOS-Accounts/lib/LATMOS/Accounts/Cli/Base.pm
+@@ -60,6 +60,29 @@ sub BUILD {
+         },
+     });
+ 
++=head3 logas
++
++    logas [username]
++
++Create an object alias named C<Name> for object C<Object>.
++
++=cut
++
++        $self->add_func(
++            'logas', {
++                code => sub {
++                    my ($self, $username) = @_;
++                    if ($self->base->SetConnectedUser($username)) {
++                        $username ||= '';
++                        print $OUT "Connected as `$username'\n";
++                    }
++                },
++                completion => sub {
++                    return $_[0]->base->list_objects('user');
++                }
++            },
++        );
++
+ =head3 unexported
+ 
+     unexported yes|no|show
