commit 9681b76a1be610ebf6489b28f115114c1eb3adb0
Author: Marc Dequènes (Duck) <Duck@DuckCorp.org>
Date:   Mon Jul 20 18:20:59 2009 +0200

    [evol] distinguish object handle from the attributes, and allow aspects to associate with an attribute ignored by the object

diff --git a/config/test.conf b/config/test.conf
index 3930db0..87701d0 100644
--- a/config/test.conf
+++ b/config/test.conf
@@ -10,7 +10,7 @@ objects:
       desc_attribute: cn
       optional_classes: []
       allowed_aspects: ['primary', 'mail', 'fs', 'shell', 'ftp', 'web', 'jabber']
-      hidden_attributes: ['objectClass']
+      hidden_attributes: ['objectClass', 'uid']
       expert_attributes: ['uidNumber', 'gidNumber', 'gecos']
     relations:
       primaryGroup:
@@ -33,7 +33,7 @@ objects:
       desc_attribute: cn
       optional_classes: []
       allowed_aspects: ['primary', 'mail', 'fs', 'shell', 'ftp', 'web', 'jabber']
-      hidden_attributes: ['objectClass']
+      hidden_attributes: ['objectClass', 'uid']
       expert_attributes: ['uidNumber', 'gidNumber', 'gecos']
     relations:
       primaryGroup:
@@ -140,4 +140,5 @@ aspects:
     mapping:
       classes: ['primaryAccount']
     presentation:
+      associated_attributes: ['uid']
     relations:
diff --git a/locale/en.yml b/locale/en.yml
index 93b92d7..91f3823 100644
--- a/locale/en.yml
+++ b/locale/en.yml
@@ -1,5 +1,10 @@
 ---
 en:
+  objects:
+    individual: "Individual"
+    bot: "Bot"
+    group: "Group"
+    entity: "Entity"
   attribute_types:
     allowGlobalDirectory: "Disclose Own Contact Information in GLobal Directory"
     cn: "Full Name"
@@ -29,7 +34,7 @@ en:
     preferredLanguage: "Language Preference"
     sn: "Surname"
     sshAuthKey: "SSH Public Key(s)"
-    uid: "Identifier"
+    uid: "Identifier (Login)"
     uidNumber: "Identifier (numeric)"
     uniqueAbbreviation: "Unique Abbreviation"
     uniqueMember: "Group member"
@@ -44,6 +49,7 @@ en:
     foundersIndividuals: "Founder(s) Individual(s)"
     foundersEntities: "Founder(s) Entity(ies)"
   aspects:
+    primary: "Primary Account"
     ftp: "FTP Account"
     web: "Web Account"
     shell: "Shell Account"
diff --git a/test.rb b/test.rb
index 1e2b1c9..df2af7f 100755
--- a/test.rb
+++ b/test.rb
@@ -98,7 +98,7 @@ module LdapMapper
         aspect_data = self.class.mapper.get_aspect(aspect)
 
         if defined?(aspect_data[:presentation][:associated_attributes]) and aspect_data[:presentation][:associated_attributes]
-          taken_attr_list = aspect_data[:presentation][:associated_attributes] & attr_list
+          taken_attr_list = aspect_data[:presentation][:associated_attributes] & (attr_list + ignored_attrs)
           unless taken_attr_list.empty?
             obj_aspects[aspect] ||= {}
             obj_aspects[aspect].merge!(fetch_attributes_data(taken_attr_list, options))
@@ -301,8 +301,8 @@ end
 
 def display_data(attr_data)
   attr_data.each_pair do |key, val|
-    item_name = translate_data_key(key)
-    puts item_name + ": " + (val.is_a?(Array) ? val.sort.collect{|v| v.to_s }.join(", ") : val.to_s)
+    field_name = translate_data_key(key)
+    puts field_name + ": " + (val.is_a?(Array) ? val.sort.collect{|v| v.to_s }.join(", ") : val.to_s)
   end
 end
 
@@ -325,20 +325,23 @@ cmd.set_execution_block do |args|
     exit 2
   end
 
-  item_name = args[1]
+  item_identifier = args[1]
   begin
-    item = obj_klass.find(item_name)
+    item = obj_klass.find(item_identifier)
   rescue ActiveLdap::EntryNotFound
-    STDERR.puts "No such item '#{obj_name}/#{item_name}'"
+    STDERR.puts "No such item '#{obj_name}/#{item_identifier}'"
     exit 2
   end
 
+  obj_human_name = I18n.t(obj_name, :scope => 'objects', :default => "Object '#{obj_name}'")
+  puts "=== #{obj_human_name}: #{item.name} ==="
+
   if $debug_opt
     puts item.to_s
-    puts "=== Detected Info ==="
+    puts "--- Detected Info ---"
     puts "aspects: " + item.aspects.sort.join(", ")
 
-    puts "=== Relations ==="
+    puts "--- Relations ---"
     item.relations.each do |rel|
       puts "#{rel}: " + item.send(rel).collect{|g| g.name }.join(", ")
     end
@@ -348,8 +351,8 @@ cmd.set_execution_block do |args|
     display_data(obj_info)
 
     obj_aspects.each_pair do |aspect_name, aspect_data|
-      aspect_display_name = I18n.t(aspect_name, :scope => 'aspects', :default => "Aspect: #{aspect_name}")
-      puts "=== #{aspect_display_name} ==="
+      aspect_display_name = I18n.t(aspect_name, :scope => 'aspects', :default => "Aspect '#{aspect_name}'")
+      puts "--- #{aspect_display_name} ---"
       display_data(aspect_data)
     end
   end
