From codesite-noreply at google.com Fri Nov 2 23:43:49 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 02 Nov 2007 20:43:49 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r446 - in trunk/examples/al-admin: app/controllers app/helpers app/views/_entry app/views/layouts... Message-ID: <00c09ff7922c043dfe1751ebb654ee02@google.com> Author: koutou Date: Fri Nov 2 20:42:38 2007 New Revision: 446 Added: trunk/examples/al-admin/app/controllers/object_classes_controller.rb trunk/examples/al-admin/app/helpers/object_classes_helper.rb trunk/examples/al-admin/app/views/object_classes/ trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml - copied, changed from r443, /trunk/examples/al-admin/app/views/_entry/_object_class_information.rhtml trunk/examples/al-admin/app/views/object_classes/index.rhtml trunk/examples/al-admin/public/stylesheets/object-classes.css trunk/examples/al-admin/test/functional/object_classes_controller_test.rb Removed: trunk/examples/al-admin/app/views/_entry/_object_class_information.rhtml Modified: trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml trunk/examples/al-admin/app/views/_entry/_entry.rhtml trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml trunk/examples/al-admin/app/views/layouts/application.rhtml trunk/examples/al-admin/lib/authenticated_system.rb trunk/examples/al-admin/public/stylesheets/base.css trunk/examples/al-admin/public/stylesheets/entry.css Log: * showed object classes list. just show. Added: trunk/examples/al-admin/app/controllers/object_classes_controller.rb ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/controllers/object_classes_controller.rb Fri Nov 2 20:42:38 2007 @@ -0,0 +1,5 @@ +class ObjectClassesController < ApplicationController + def index + @object_classes = current_ldap_user.schema.object_classes + end +end Added: trunk/examples/al-admin/app/helpers/object_classes_helper.rb ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/helpers/object_classes_helper.rb Fri Nov 2 20:42:38 2007 @@ -0,0 +1,2 @@ +module ObjectClassesHelper +end Modified: trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml (original) +++ trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml Fri Nov 2 20:42:38 2007 @@ -1,6 +1,6 @@ -
- +
+
Modified: trunk/examples/al-admin/app/views/_entry/_entry.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/_entry/_entry.rhtml (original) +++ trunk/examples/al-admin/app/views/_entry/_entry.rhtml Fri Nov 2 20:42:38 2007 @@ -8,8 +8,8 @@ <%= _("objectClasses") %>
- <%= render(:partial => "_entry/object_class_information", - :locals => {:entry => entry}) %> + <%= render(:partial => "object_classes/object_classes", + :object => entry.classes) %>

Modified: trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml (original) +++ trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml Fri Nov 2 20:42:38 2007 @@ -4,7 +4,8 @@

<%= _("attribute name") %>
+
+
@@ -9,7 +9,7 @@ -<% entry.classes.sort.each do |object_class| -%> +<% object_classes.uniq.sort.each do |object_class| -%> Added: trunk/examples/al-admin/app/views/object_classes/index.rhtml ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/views/object_classes/index.rhtml Fri Nov 2 20:42:38 2007 @@ -0,0 +1 @@ +<%= render(:partial => "object_classes", :object => @object_classes) %> Modified: trunk/examples/al-admin/lib/authenticated_system.rb ============================================================================== --- trunk/examples/al-admin/lib/authenticated_system.rb (original) +++ trunk/examples/al-admin/lib/authenticated_system.rb Fri Nov 2 20:42:38 2007 @@ -17,7 +17,11 @@ def current_user @current_user ||= (session[:user] && User.find_by_id(session[:user])) || :false end - + + def current_ldap_user + logged_in? ? current_user.ldap_user : nil + end + # Store the given user in the session. def current_user=(new_user) session[:user] = (new_user.nil? || new_user.is_a?(Symbol)) ? nil : new_user.id Modified: trunk/examples/al-admin/public/stylesheets/base.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/base.css (original) +++ trunk/examples/al-admin/public/stylesheets/base.css Fri Nov 2 20:42:38 2007 @@ -55,3 +55,22 @@ { text-align: left; } + +table.values +{ + background-color: #9c9; +} + +table.values tr, +table.values th, +table.values td +{ + background-color: white; + padding: 5px; +} + +table.values tr.even th, +table.values tr.even td +{ + background-color: #efe; +} Modified: trunk/examples/al-admin/public/stylesheets/entry.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/entry.css (original) +++ trunk/examples/al-admin/public/stylesheets/entry.css Fri Nov 2 20:42:38 2007 @@ -29,22 +29,3 @@ { padding: 1em; } - -div.entry table -{ - background-color: #9c9; -} - -div.entry tr, -div.entry th, -div.entry td -{ - background-color: white; - padding: 5px; -} - -div.entry tr.even th, -div.entry tr.even td -{ - background-color: #efe; -} Added: trunk/examples/al-admin/public/stylesheets/object-classes.css ============================================================================== Added: trunk/examples/al-admin/test/functional/object_classes_controller_test.rb ============================================================================== --- (empty file) +++ trunk/examples/al-admin/test/functional/object_classes_controller_test.rb Fri Nov 2 20:42:38 2007 @@ -0,0 +1,18 @@ +require File.dirname(__FILE__) + '/../test_helper' +require 'object_classes_controller' + +# Re-raise errors caught by the controller. +class ObjectClassesController; def rescue_action(e) raise e end; end + +class ObjectClassesControllerTest < Test::Unit::TestCase + def setup + @controller = ObjectClassesController.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + end + + # Replace this with your real tests. + def test_truth + assert true + end +end From codesite-noreply at google.com Sat Nov 3 00:12:04 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 02 Nov 2007 21:12:04 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r447 - in trunk/examples/al-admin: app/controllers app/views/_entry app/views/object_classes publ... Message-ID: <00163600d873043dfe7c67046d55532a@google.com> Author: koutou Date: Fri Nov 2 21:11:25 2007 New Revision: 447 Added: trunk/examples/al-admin/app/views/object_classes/show.rhtml Modified: trunk/examples/al-admin/app/controllers/object_classes_controller.rb trunk/examples/al-admin/app/views/_entry/_entry.rhtml trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml trunk/examples/al-admin/app/views/object_classes/index.rhtml trunk/examples/al-admin/public/stylesheets/base.css trunk/examples/al-admin/public/stylesheets/entry.css trunk/examples/al-admin/public/stylesheets/users.css Log: * showed an objctClass detail. Modified: trunk/examples/al-admin/app/controllers/object_classes_controller.rb ============================================================================== --- trunk/examples/al-admin/app/controllers/object_classes_controller.rb (original) +++ trunk/examples/al-admin/app/controllers/object_classes_controller.rb Fri Nov 2 21:11:25 2007 @@ -1,5 +1,19 @@ class ObjectClassesController < ApplicationController def index - @object_classes = current_ldap_user.schema.object_classes + @object_classes = schema.object_classes + end + + def show + key = params[:id] + @object_class = schema.object_classes.find do |object_class| + object_class.name == key or + object_class.id == key + end + raise ActiveRecord::RecordNotFound if @object_class.nil? + end + + private + def schema + @schema ||= current_ldap_user.schema end end Modified: trunk/examples/al-admin/app/views/_entry/_entry.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/_entry/_entry.rhtml (original) +++ trunk/examples/al-admin/app/views/_entry/_entry.rhtml Fri Nov 2 21:11:25 2007 @@ -1,7 +1,7 @@ <% title ||= h(entry.short_dn) %>

<%= title %>

- <%= h(entry.dn) %> + <%= h(entry.dn) %>

Modified: trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml Fri Nov 2 21:11:25 2007 @@ -11,7 +11,10 @@

<% object_classes.uniq.sort.each do |object_class| -%> - + <% end -%> Modified: trunk/examples/al-admin/app/views/object_classes/index.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/index.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/index.rhtml Fri Nov 2 21:11:25 2007 @@ -1 +1,4 @@ + +

<%= _("objectClass list") %>

+ <%= render(:partial => "object_classes", :object => @object_classes) %> Added: trunk/examples/al-admin/app/views/object_classes/show.rhtml ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/views/object_classes/show.rhtml Fri Nov 2 21:11:25 2007 @@ -0,0 +1,60 @@ + +
+

<%= h(loc_(@object_class)) %>

+ <%= h(@object_class.id) %> + +

<%= _("Description") %>

+

<%= h(locd_(@object_class)) %>

+ +

<%= _("Aliases") %>

+ + +

<%= _("Requeired attributes") %>

+
<%= _("objectClass name") %>
<%=h loc_(object_class) %> <%=h locd_(object_class) %>
<%=h loc_(object_class) %><%= link_to(h(loc_(object_class)), + :controller => "object_classes", + :action => "show", + :id => object_class.is_a?(String) ? object_class : object_class.name) %> <%=h locd_(object_class) %>
+ + + + + + + + +<% @object_class.must.sort.each do |attribute| -%> + + + + +<% end -%> + +
<%= _("Name") %><%= _("Description") %>
<%= h(la_(attribute)) %><%= h(lad_(attribute)) %>
+ +

<%= _("Optional attributes") %>

+ + + + + + + + + +<% @object_class.may.sort.each do |attribute| -%> + + + + +<% end -%> + +
<%= _("Name") %><%= _("Description") %>
<%= h(la_(attribute)) %><%= h(lad_(attribute)) %>
+ +
+ + Modified: trunk/examples/al-admin/public/stylesheets/base.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/base.css (original) +++ trunk/examples/al-admin/public/stylesheets/base.css Fri Nov 2 21:11:25 2007 @@ -74,3 +74,28 @@ { background-color: #efe; } + +div.navi +{ + text-align: right; +} + +div.navi ul +{ + margin-bottom: 0; +} + +div.navi li +{ + display: inline; + padding-left: 5px; + border-left: 1px solid black; +} + +span.full-identifier +{ + color: gray; + font-size: small; + text-align: right; + display: block; +} Modified: trunk/examples/al-admin/public/stylesheets/entry.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/entry.css (original) +++ trunk/examples/al-admin/public/stylesheets/entry.css Fri Nov 2 21:11:25 2007 @@ -3,14 +3,6 @@ margin-bottom: 0; } -div.entry span.dn -{ - color: gray; - font-size: small; - text-align: right; - display: block; -} - div.entry h3 { background-color: #cfc; Modified: trunk/examples/al-admin/public/stylesheets/users.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/users.css (original) +++ trunk/examples/al-admin/public/stylesheets/users.css Fri Nov 2 21:11:25 2007 @@ -1,22 +1,5 @@ @import url("entry.css"); -div.navi -{ - text-align: right; -} - -div.navi ul -{ - margin-bottom: 0; -} - -div.navi li -{ - display: inline; - padding-left: 5px; - border-left: 1px solid black; -} - form table { margin: 1em; From codesite-noreply at google.com Sat Nov 3 00:16:05 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 02 Nov 2007 21:16:05 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r448 - in trunk/examples/al-admin/po: en ja nl Message-ID: <00c09ffb4bcf043dfe8abf3ab25552dc@google.com> Author: koutou Date: Fri Nov 2 21:12:17 2007 New Revision: 448 Modified: trunk/examples/al-admin/po/en/al-admin.po trunk/examples/al-admin/po/ja/al-admin.po trunk/examples/al-admin/po/nl/al-admin.po Log: * updated messages. Modified: trunk/examples/al-admin/po/en/al-admin.po ============================================================================== --- trunk/examples/al-admin/po/en/al-admin.po (original) +++ trunk/examples/al-admin/po/en/al-admin.po Fri Nov 2 21:12:17 2007 @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: AL Admin 0.8.4\n" -"POT-Creation-Date: 2007-10-27 21:03+0900\n" +"POT-Creation-Date: 2007-11-03 13:11+0900\n" "PO-Revision-Date: 2007-08-19 09:44+0900\n" "Last-Translator: Kouhei Sutou \n" "Language-Team: English\n" @@ -67,7 +67,7 @@ msgid "Populating is only for initialization" msgstr "" -#: app/controllers/account_controller.rb:24 lib/authenticated_system.rb:119 +#: app/controllers/account_controller.rb:24 lib/authenticated_system.rb:123 msgid "Logged in successfully" msgstr "" @@ -99,8 +99,8 @@ msgid "Done." msgstr "" -#: app/views/directory/populate.rhtml:2 app/views/users/edit.rhtml:14 -#: app/views/users/show.rhtml:9 +#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:58 +#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9 msgid "Menu|Index" msgstr "" @@ -124,34 +124,65 @@ msgid "Menu|Directory" msgstr "" -#: app/views/_entry/_object_class_information.rhtml:6 -msgid "objectClass name" -msgstr "" - -#: app/views/_entry/_object_class_information.rhtml:7 -#: app/views/_entry/_attributes_information.rhtml:8 -#: app/views/users/_form.rhtml:29 -msgid "description" +#: app/views/layouts/_main_menu.rhtml:8 +msgid "Menu|objectClass list" msgstr "" #: app/views/_entry/_attributes_information.rhtml:6 -#: app/views/users/_form.rhtml:27 +#: app/views/users/_attributes_update_form.rhtml:8 msgid "attribute name" msgstr "" #: app/views/_entry/_attributes_information.rhtml:7 -#: app/views/users/_form.rhtml:28 +#: app/views/users/_attributes_update_form.rhtml:9 msgid "value" msgstr "" -#: app/views/_entry/_entry.rhtml:10 +#: app/views/_entry/_attributes_information.rhtml:8 +#: app/views/object_classes/_object_classes.rhtml:7 +#: app/views/users/_attributes_update_form.rhtml:10 +msgid "description" +msgstr "" + +#: app/views/_entry/_entry.rhtml:8 msgid "objectClasses" msgstr "" -#: app/views/_entry/_entry.rhtml:19 +#: app/views/_entry/_entry.rhtml:17 msgid "Attributes" msgstr "" +#: app/views/object_classes/_object_classes.rhtml:6 +msgid "objectClass name" +msgstr "" + +#: app/views/object_classes/show.rhtml:6 +#: app/views/object_classes/show.rhtml:21 +#: app/views/object_classes/show.rhtml:40 +msgid "Description" +msgstr "" + +#: app/views/object_classes/show.rhtml:9 +msgid "Aliases" +msgstr "" + +#: app/views/object_classes/show.rhtml:16 +msgid "Requeired attributes" +msgstr "" + +#: app/views/object_classes/show.rhtml:20 +#: app/views/object_classes/show.rhtml:39 +msgid "Name" +msgstr "" + +#: app/views/object_classes/show.rhtml:35 +msgid "Optional attributes" +msgstr "" + +#: app/views/object_classes/index.rhtml:2 +msgid "objectClass list" +msgstr "" + #: app/views/users/edit.rhtml:7 msgid "Command|Update" msgstr "" @@ -160,26 +191,28 @@ msgid "Menu|Show" msgstr "" -#: app/views/users/_form.rhtml:4 +#: app/views/users/_password_change_form.rhtml:2 msgid "Change password" msgstr "" -#: app/views/users/_form.rhtml:8 app/views/account/sign_up.rhtml:7 +#: app/views/users/_password_change_form.rhtml:7 +#: app/views/account/sign_up.rhtml:7 msgid "Password" msgstr "" -#: app/views/users/_form.rhtml:15 app/views/account/sign_up.rhtml:10 +#: app/views/users/_password_change_form.rhtml:15 +#: app/views/account/sign_up.rhtml:10 msgid "Confirm Password" msgstr "" -#: app/views/users/_form.rhtml:22 -msgid "Update attributes" -msgstr "" - #: app/views/users/index.rhtml:2 msgid "No user." msgstr "" +#: app/views/users/_attributes_update_form.rhtml:3 +msgid "Update attributes" +msgstr "" + #: app/views/account/login.rhtml:5 msgid "Login:" msgstr "" @@ -216,6 +249,6 @@ msgid "Welcome %s!" msgstr "" -#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:75 +#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:79 msgid "Please login." msgstr "" Modified: trunk/examples/al-admin/po/ja/al-admin.po ============================================================================== --- trunk/examples/al-admin/po/ja/al-admin.po (original) +++ trunk/examples/al-admin/po/ja/al-admin.po Fri Nov 2 21:12:17 2007 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: AL Admin 0.8.4\n" -"POT-Creation-Date: 2007-10-27 21:03+0900\n" -"PO-Revision-Date: 2007-10-27 21:04+0900\n" +"POT-Creation-Date: 2007-11-03 13:11+0900\n" +"PO-Revision-Date: 2007-11-03 13:11+0900\n" "Last-Translator: Kouhei Sutou \n" "Language-Team: Japanese\n" "MIME-Version: 1.0\n" @@ -67,7 +67,7 @@ msgid "Populating is only for initialization" msgstr "$B%G!<%?9=C[$O=i4|2=;~$N$_MxMQ$G$-$^$9!#(B" -#: app/controllers/account_controller.rb:24 lib/authenticated_system.rb:119 +#: app/controllers/account_controller.rb:24 lib/authenticated_system.rb:123 msgid "Logged in successfully" msgstr "$B%m%0%$%s$K at .8y$7$^$7$?!#(B" @@ -99,8 +99,8 @@ msgid "Done." msgstr "$B40N;!#(B" -#: app/views/directory/populate.rhtml:2 app/views/users/edit.rhtml:14 -#: app/views/users/show.rhtml:9 +#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:58 +#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9 msgid "Menu|Index" msgstr "$B0lMw(B" @@ -124,34 +124,65 @@ msgid "Menu|Directory" msgstr "$B%G%#%l%/%H%j(B" -#: app/views/_entry/_object_class_information.rhtml:6 -msgid "objectClass name" -msgstr "$B%*%V%8%'%/%H%/%i%9L>(B" - -#: app/views/_entry/_object_class_information.rhtml:7 -#: app/views/_entry/_attributes_information.rhtml:8 -#: app/views/users/_form.rhtml:29 -msgid "description" -msgstr "$B at bL@(B" +#: app/views/layouts/_main_menu.rhtml:8 +msgid "Menu|objectClass list" +msgstr "$B%*%V%8%'%/%H%/%i%90lMw(B" #: app/views/_entry/_attributes_information.rhtml:6 -#: app/views/users/_form.rhtml:27 +#: app/views/users/_attributes_update_form.rhtml:8 msgid "attribute name" msgstr "$BB0 at -L>(B" #: app/views/_entry/_attributes_information.rhtml:7 -#: app/views/users/_form.rhtml:28 +#: app/views/users/_attributes_update_form.rhtml:9 msgid "value" msgstr "$BCM(B" -#: app/views/_entry/_entry.rhtml:10 +#: app/views/_entry/_attributes_information.rhtml:8 +#: app/views/object_classes/_object_classes.rhtml:7 +#: app/views/users/_attributes_update_form.rhtml:10 +msgid "description" +msgstr "$B at bL@(B" + +#: app/views/_entry/_entry.rhtml:8 msgid "objectClasses" msgstr "$B%*%V%8%'%/%H%/%i%90lMw(B" -#: app/views/_entry/_entry.rhtml:19 +#: app/views/_entry/_entry.rhtml:17 msgid "Attributes" msgstr "$BB0 at -0lMw(B" +#: app/views/object_classes/_object_classes.rhtml:6 +msgid "objectClass name" +msgstr "$B%*%V%8%'%/%H%/%i%9L>(B" + +#: app/views/object_classes/show.rhtml:6 +#: app/views/object_classes/show.rhtml:21 +#: app/views/object_classes/show.rhtml:40 +msgid "Description" +msgstr "$B at bL@(B" + +#: app/views/object_classes/show.rhtml:9 +msgid "Aliases" +msgstr "$BJLL>0lMw(B" + +#: app/views/object_classes/show.rhtml:16 +msgid "Requeired attributes" +msgstr "$BI,?\$NB0 at -0lMw(B" + +#: app/views/object_classes/show.rhtml:20 +#: app/views/object_classes/show.rhtml:39 +msgid "Name" +msgstr "$BL>A0(B" + +#: app/views/object_classes/show.rhtml:35 +msgid "Optional attributes" +msgstr "$B>JN,2DG=$JB0 at -0lMw(B" + +#: app/views/object_classes/index.rhtml:2 +msgid "objectClass list" +msgstr "$B%*%V%8%'%/%H%/%i%90lMw(B" + #: app/views/users/edit.rhtml:7 msgid "Command|Update" msgstr "$B99?7(B" @@ -160,26 +191,28 @@ msgid "Menu|Show" msgstr "$BI=<((B" -#: app/views/users/_form.rhtml:4 +#: app/views/users/_password_change_form.rhtml:2 msgid "Change password" msgstr "$B%Q%9%o!<%IJQ99(B" -#: app/views/users/_form.rhtml:8 app/views/account/sign_up.rhtml:7 +#: app/views/users/_password_change_form.rhtml:7 +#: app/views/account/sign_up.rhtml:7 msgid "Password" msgstr "$B%Q%9%o!<%I(B" -#: app/views/users/_form.rhtml:15 app/views/account/sign_up.rhtml:10 +#: app/views/users/_password_change_form.rhtml:15 +#: app/views/account/sign_up.rhtml:10 msgid "Confirm Password" msgstr "$B3NG'MQ%Q%9%o!<%I(B" -#: app/views/users/_form.rhtml:22 -msgid "Update attributes" -msgstr "$BB0 at -99?7(B" - #: app/views/users/index.rhtml:2 msgid "No user." msgstr "$B%f!<%6$,$$$^$;$s!#(B" +#: app/views/users/_attributes_update_form.rhtml:3 +msgid "Update attributes" +msgstr "$BB0 at -99?7(B" + #: app/views/account/login.rhtml:5 msgid "Login:" msgstr "$B%m%0%$%sL>(B:" @@ -216,6 +249,6 @@ msgid "Welcome %s!" msgstr "$B$h$&$3$=(B%s$B!*(B" -#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:75 +#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:79 msgid "Please login." msgstr "$B%m%0%$%s$7$F$/$@$5$$!#(B" Modified: trunk/examples/al-admin/po/nl/al-admin.po ============================================================================== --- trunk/examples/al-admin/po/nl/al-admin.po (original) +++ trunk/examples/al-admin/po/nl/al-admin.po Fri Nov 2 21:12:17 2007 @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: AL Admin 0.8.4\n" -"POT-Creation-Date: 2007-10-27 21:03+0900\n" +"POT-Creation-Date: 2007-11-03 13:11+0900\n" "PO-Revision-Date: 2007-08-24 22:03+0900\n" "Last-Translator: Ace Suares \n" "Language-Team: Nederlands \n" @@ -70,7 +70,7 @@ msgid "Populating is only for initialization" msgstr "" -#: app/controllers/account_controller.rb:24 lib/authenticated_system.rb:119 +#: app/controllers/account_controller.rb:24 lib/authenticated_system.rb:123 msgid "Logged in successfully" msgstr "Succesvol aangemeld" @@ -102,8 +102,8 @@ msgid "Done." msgstr "" -#: app/views/directory/populate.rhtml:2 app/views/users/edit.rhtml:14 -#: app/views/users/show.rhtml:9 +#: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:58 +#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9 #, fuzzy msgid "Menu|Index" msgstr "menu|Aanmelden" @@ -128,35 +128,70 @@ msgid "Menu|Directory" msgstr "" -#: app/views/_entry/_object_class_information.rhtml:6 -msgid "objectClass name" -msgstr "" - -#: app/views/_entry/_object_class_information.rhtml:7 -#: app/views/_entry/_attributes_information.rhtml:8 -#: app/views/users/_form.rhtml:29 -msgid "description" -msgstr "beschrijving" +#: app/views/layouts/_main_menu.rhtml:8 +#, fuzzy +msgid "Menu|objectClass list" +msgstr "Gebruikerslijst" #: app/views/_entry/_attributes_information.rhtml:6 -#: app/views/users/_form.rhtml:27 +#: app/views/users/_attributes_update_form.rhtml:8 msgid "attribute name" msgstr "naam van het attribuut" #: app/views/_entry/_attributes_information.rhtml:7 -#: app/views/users/_form.rhtml:28 +#: app/views/users/_attributes_update_form.rhtml:9 msgid "value" msgstr "waarde" -#: app/views/_entry/_entry.rhtml:10 +#: app/views/_entry/_attributes_information.rhtml:8 +#: app/views/object_classes/_object_classes.rhtml:7 +#: app/views/users/_attributes_update_form.rhtml:10 +msgid "description" +msgstr "beschrijving" + +#: app/views/_entry/_entry.rhtml:8 msgid "objectClasses" msgstr "" -#: app/views/_entry/_entry.rhtml:19 +#: app/views/_entry/_entry.rhtml:17 #, fuzzy msgid "Attributes" msgstr "naam van het attribuut" +#: app/views/object_classes/_object_classes.rhtml:6 +msgid "objectClass name" +msgstr "" + +#: app/views/object_classes/show.rhtml:6 +#: app/views/object_classes/show.rhtml:21 +#: app/views/object_classes/show.rhtml:40 +#, fuzzy +msgid "Description" +msgstr "beschrijving" + +#: app/views/object_classes/show.rhtml:9 +msgid "Aliases" +msgstr "" + +#: app/views/object_classes/show.rhtml:16 +#, fuzzy +msgid "Requeired attributes" +msgstr "naam van het attribuut" + +#: app/views/object_classes/show.rhtml:20 +#: app/views/object_classes/show.rhtml:39 +msgid "Name" +msgstr "" + +#: app/views/object_classes/show.rhtml:35 +#, fuzzy +msgid "Optional attributes" +msgstr "naam van het attribuut" + +#: app/views/object_classes/index.rhtml:2 +msgid "objectClass list" +msgstr "" + #: app/views/users/edit.rhtml:7 msgid "Command|Update" msgstr "" @@ -165,28 +200,30 @@ msgid "Menu|Show" msgstr "Toon" -#: app/views/users/_form.rhtml:4 +#: app/views/users/_password_change_form.rhtml:2 #, fuzzy msgid "Change password" msgstr "Bevestig Wachtwoord" -#: app/views/users/_form.rhtml:8 app/views/account/sign_up.rhtml:7 +#: app/views/users/_password_change_form.rhtml:7 +#: app/views/account/sign_up.rhtml:7 msgid "Password" msgstr "Wachtwoord" -#: app/views/users/_form.rhtml:15 app/views/account/sign_up.rhtml:10 +#: app/views/users/_password_change_form.rhtml:15 +#: app/views/account/sign_up.rhtml:10 msgid "Confirm Password" msgstr "Bevestig Wachtwoord" -#: app/views/users/_form.rhtml:22 -#, fuzzy -msgid "Update attributes" -msgstr "naam van het attribuut" - #: app/views/users/index.rhtml:2 msgid "No user." msgstr "Geen gebruiker" +#: app/views/users/_attributes_update_form.rhtml:3 +#, fuzzy +msgid "Update attributes" +msgstr "naam van het attribuut" + #: app/views/account/login.rhtml:5 #, fuzzy msgid "Login:" @@ -226,7 +263,7 @@ msgid "Welcome %s!" msgstr "" -#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:75 +#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:79 msgid "Please login." msgstr "" From codesite-noreply at google.com Sat Nov 3 00:20:05 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 02 Nov 2007 21:20:05 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r449 - trunk/examples/al-admin/app/views/users Message-ID: <00c09ff7928c043dfe99125c4055fe55@google.com> Author: koutou Date: Fri Nov 2 21:12:54 2007 New Revision: 449 Removed: trunk/examples/al-admin/app/views/users/_entry.rhtml Log: * removed a needless file. From codesite-noreply at google.com Sat Nov 3 00:24:06 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 02 Nov 2007 21:24:06 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r450 - in trunk/examples/al-admin: app/views/_entry app/views/object_classes public/stylesheets Message-ID: <00163600d873043dfea7665b1a55af93@google.com> Author: koutou Date: Fri Nov 2 21:19:23 2007 New Revision: 450 Added: trunk/examples/al-admin/public/stylesheets/detail.css Removed: trunk/examples/al-admin/public/stylesheets/entry.css Modified: trunk/examples/al-admin/app/views/_entry/_entry.rhtml trunk/examples/al-admin/app/views/object_classes/show.rhtml trunk/examples/al-admin/public/stylesheets/directory.css trunk/examples/al-admin/public/stylesheets/object-classes.css trunk/examples/al-admin/public/stylesheets/users.css Log: * unified style. Modified: trunk/examples/al-admin/app/views/_entry/_entry.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/_entry/_entry.rhtml (original) +++ trunk/examples/al-admin/app/views/_entry/_entry.rhtml Fri Nov 2 21:19:23 2007 @@ -1,5 +1,5 @@ <% title ||= h(entry.short_dn) %> -
+

<%= title %>

<%= h(entry.dn) %> Modified: trunk/examples/al-admin/app/views/object_classes/show.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/show.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/show.rhtml Fri Nov 2 21:19:23 2007 @@ -1,5 +1,5 @@ -
+

<%= h(loc_(@object_class)) %>

<%= h(@object_class.id) %> Added: trunk/examples/al-admin/public/stylesheets/detail.css ============================================================================== --- (empty file) +++ trunk/examples/al-admin/public/stylesheets/detail.css Fri Nov 2 21:19:23 2007 @@ -0,0 +1,23 @@ +div.detail h2 +{ + margin-bottom: 0; +} + +div.detail h3 +{ + background-color: #cfc; + margin-bottom: 0; + padding-left: 0.5em; +} + +div.detail span.switch +{ + margin-left: -0.5em; + margin-right: 0.5em; + height: 1.25em; +} + +div.detail div.switcher-content +{ + padding: 1em; +} Modified: trunk/examples/al-admin/public/stylesheets/directory.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/directory.css (original) +++ trunk/examples/al-admin/public/stylesheets/directory.css Fri Nov 2 21:19:23 2007 @@ -1,4 +1,4 @@ - at import url(entry.css); + at import url("detail.css"); #directory-tree { Modified: trunk/examples/al-admin/public/stylesheets/object-classes.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/object-classes.css (original) +++ trunk/examples/al-admin/public/stylesheets/object-classes.css Fri Nov 2 21:19:23 2007 @@ -0,0 +1,6 @@ + at import url("detail.css"); + +p.object-class +{ + margin-left: 1em; +} Modified: trunk/examples/al-admin/public/stylesheets/users.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/users.css (original) +++ trunk/examples/al-admin/public/stylesheets/users.css Fri Nov 2 21:19:23 2007 @@ -1,4 +1,4 @@ - at import url("entry.css"); + at import url("detail.css"); form table { From codesite-noreply at google.com Sat Nov 3 00:27:31 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 02 Nov 2007 21:27:31 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r451 - in trunk/examples/al-admin: app/views/_entry public/stylesheets Message-ID: <00c09ff7922c043dfeb39f0e1256357f@google.com> Author: koutou Date: Fri Nov 2 21:23:04 2007 New Revision: 451 Modified: trunk/examples/al-admin/app/views/_entry/_entry.rhtml trunk/examples/al-admin/public/stylesheets/base.css trunk/examples/al-admin/public/stylesheets/detail.css trunk/examples/al-admin/public/stylesheets/object-classes.css Log: * improved names. Modified: trunk/examples/al-admin/app/views/_entry/_entry.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/_entry/_entry.rhtml (original) +++ trunk/examples/al-admin/app/views/_entry/_entry.rhtml Fri Nov 2 21:23:04 2007 @@ -4,27 +4,27 @@ <%= h(entry.dn) %>

- + <%= _("objectClasses") %>

-
+
<%= render(:partial => "object_classes/object_classes", :object => entry.classes) %>

- + <%= _("Attributes") %>

-
+
<%= render(:partial => "_entry/attributes_information", :locals => {:entry => entry}) %>
-<%= javascript_tag("new Switcher('object-class-information-switch', - 'object-class-information-content', +<%= javascript_tag("new Switcher('object-classes-switch', + 'object-classes-content', {open: true}); - new Switcher('attributes-information-switch', - 'attributes-information-content', + new Switcher('attributes-switch', + 'attributes-content', {open: true});") %> Modified: trunk/examples/al-admin/public/stylesheets/base.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/base.css (original) +++ trunk/examples/al-admin/public/stylesheets/base.css Fri Nov 2 21:23:04 2007 @@ -91,11 +91,3 @@ padding-left: 5px; border-left: 1px solid black; } - -span.full-identifier -{ - color: gray; - font-size: small; - text-align: right; - display: block; -} Modified: trunk/examples/al-admin/public/stylesheets/detail.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/detail.css (original) +++ trunk/examples/al-admin/public/stylesheets/detail.css Fri Nov 2 21:23:04 2007 @@ -21,3 +21,11 @@ { padding: 1em; } + +div.detail span.full-identifier +{ + color: gray; + font-size: small; + text-align: right; + display: block; +} Modified: trunk/examples/al-admin/public/stylesheets/object-classes.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/object-classes.css (original) +++ trunk/examples/al-admin/public/stylesheets/object-classes.css Fri Nov 2 21:23:04 2007 @@ -1,6 +1,6 @@ @import url("detail.css"); -p.object-class +p.description { - margin-left: 1em; + margin: 1em; } From codesite-noreply at google.com Sat Nov 3 00:33:33 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 02 Nov 2007 21:33:33 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r452 - trunk/examples/al-admin/app/views/object_classes Message-ID: <00163600d06e043dfec937d21a4cabd8@google.com> Author: koutou Date: Fri Nov 2 21:32:35 2007 New Revision: 452 Added: trunk/examples/al-admin/app/views/object_classes/_aliases.rhtml trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml Modified: trunk/examples/al-admin/app/views/object_classes/show.rhtml Log: * split. Added: trunk/examples/al-admin/app/views/object_classes/_aliases.rhtml ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/views/object_classes/_aliases.rhtml Fri Nov 2 21:32:35 2007 @@ -0,0 +1,7 @@ + +

<%= _("Aliases") %>

+
    +<% aliases.uniq.sort.each do |alias_name| -%> +
  • <%= h(alias_name) %>
  • +<% end -%> +
Added: trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml Fri Nov 2 21:32:35 2007 @@ -0,0 +1,18 @@ + + + + + + + + + + +<% attributes.sort.each do |attribute| -%> + + + + +<% end -%> + +
<%= _("Name") %><%= _("Description") %>
<%= h(la_(attribute)) %><%= h(lad_(attribute)) %>
Modified: trunk/examples/al-admin/app/views/object_classes/show.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/show.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/show.rhtml Fri Nov 2 21:32:35 2007 @@ -6,51 +6,27 @@

<%= _("Description") %>

<%= h(locd_(@object_class)) %>

-

<%= _("Aliases") %>

-
    -<% @object_class.aliases.uniq.sort.each do |alias_name| %> -
  • <%= h(alias_name) %>
  • -<% end %> -
+<% unless @object_class.aliases.empty? -%> + <%= render(:partial => "aliases", :object => @object_class.aliases) %> +<% end -%>

<%= _("Requeired attributes") %>

- - - - - - - - - -<% @object_class.must.sort.each do |attribute| -%> - - - - +
+<% if @object_class.must.empty? -%> +

<%= _("None") %>

+<% else -%> + <%= render(:partial => "attributes", :object => @object_class.must) %> <% end -%> -
-
<%= _("Name") %><%= _("Description") %>
<%= h(la_(attribute)) %><%= h(lad_(attribute)) %>
+

<%= _("Optional attributes") %>

- - - - - - - - - -<% @object_class.may.sort.each do |attribute| -%> - - - - +
+<% if @object_class.may.empty? -%> +

<%= _("None") %>

+<% else -%> + <%= render(:partial => "attributes", :object => @object_class.may) %> <% end -%> -
-
<%= _("Name") %><%= _("Description") %>
<%= h(la_(attribute)) %><%= h(lad_(attribute)) %>
- +
+ +<%= javascript_tag("new Switcher('#{prefix}-switch', + '#{prefix}-content', + {open: true})") %> Modified: trunk/examples/al-admin/app/views/object_classes/show.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/show.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/show.rhtml Fri Nov 2 21:38:18 2007 @@ -10,23 +10,15 @@ <%= render(:partial => "aliases", :object => @object_class.aliases) %> <% end -%> -

<%= _("Requeired attributes") %>

-
-<% if @object_class.must.empty? -%> -

<%= _("None") %>

-<% else -%> - <%= render(:partial => "attributes", :object => @object_class.must) %> -<% end -%> -
+ <%= render(:partial => "attributes", + :object => @object_class.must, + :locals => {:title => _("Requeired attributes"), + :prefix => "required-attributes"}) %> -

<%= _("Optional attributes") %>

-
-<% if @object_class.may.empty? -%> -

<%= _("None") %>

-<% else -%> - <%= render(:partial => "attributes", :object => @object_class.may) %> -<% end -%> -
+ <%= render(:partial => "attributes", + :object => @object_class.may, + :locals => {:title => _("Optional attributes"), + :prefix => "optional-attributes"}) %>
+ <%= switcher_element("object-classes") %>

@@ -20,11 +21,5 @@ <%= render(:partial => "_entry/attributes_information", :locals => {:entry => entry}) %>

+ <%= switcher_element("attributes") %> - -<%= javascript_tag("new Switcher('object-classes-switch', - 'object-classes-content', - {open: true}); - new Switcher('attributes-switch', - 'attributes-content', - {open: true});") %> Modified: trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml Fri Nov 2 21:58:17 2007 @@ -27,6 +27,4 @@ <% end -%> -<%= javascript_tag("new Switcher('#{prefix}-switch', - '#{prefix}-content', - {open: true})") %> +<%= switcher_element(prefix) %> Modified: trunk/examples/al-admin/app/views/object_classes/show.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/show.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/show.rhtml Fri Nov 2 21:58:17 2007 @@ -10,6 +10,21 @@ <%= render(:partial => "aliases", :object => @object_class.aliases) %> <% end -%> +

+ + <%= _("Super classes") %> +

+
+<% if @object_class.super_classes.empty? -%> +

<%= _("None") %>

+<% else -%> + <%= render(:partial => "object_classes", + :object => @object_class.super_classes) %> +<% end -%> +
+ <%= switcher_element('object-classes') %> + + <%= render(:partial => "attributes", :object => @object_class.must, :locals => {:title => _("Requeired attributes"), From codesite-noreply at google.com Sat Nov 3 01:09:01 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 02 Nov 2007 22:09:01 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r458 - in trunk/examples/al-admin/app: helpers views/_entry views/_switcher views/object_classes Message-ID: <00c09ffb4bcf043dff480b71bb56dddf@google.com> Author: koutou Date: Fri Nov 2 22:08:13 2007 New Revision: 458 Added: trunk/examples/al-admin/app/views/_switcher/ trunk/examples/al-admin/app/views/_switcher/_after.rhtml trunk/examples/al-admin/app/views/_switcher/_before.rhtml Modified: trunk/examples/al-admin/app/helpers/application_helper.rb trunk/examples/al-admin/app/views/_entry/_entry.rhtml trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml Log: * defined a helper to generate HTML for Switcher easily. Modified: trunk/examples/al-admin/app/helpers/application_helper.rb ============================================================================== --- trunk/examples/al-admin/app/helpers/application_helper.rb (original) +++ trunk/examples/al-admin/app/helpers/application_helper.rb Fri Nov 2 22:08:13 2007 @@ -18,6 +18,16 @@ "#{flash_box_div}\n#{javascript_tag(javascript_content)}" end + def switcher(prefix, title, &proc) + concat(render(:partial => "_switcher/before", + :locals => {:prefix => prefix, :title => title}), + proc.binding) + yield + concat(render(:partial => "_switcher/after", + :locals => {:prefix => prefix}), + proc.binding) + end + def switcher_element(prefix, options={}) options[:open] = true unless options.has_key?(:open) switch_id = "#{prefix}-switch".to_json Modified: trunk/examples/al-admin/app/views/_entry/_entry.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/_entry/_entry.rhtml (original) +++ trunk/examples/al-admin/app/views/_entry/_entry.rhtml Fri Nov 2 22:08:13 2007 @@ -3,23 +3,13 @@

<%= title %>

<%= h(entry.dn) %> -

- - <%= _("objectClasses") %> -

-
+ <% switcher("object-classes", _("objectClasses")) do %> <%= render(:partial => "object_classes/object_classes", :object => entry.classes) %> -
- <%= switcher_element("object-classes") %> + <% end %> -

- - <%= _("Attributes") %> -

-
+ <% switcher("attributes", _("Attributes")) do %> <%= render(:partial => "_entry/attributes_information", :locals => {:entry => entry}) %> -
- <%= switcher_element("attributes") %> + <% end %> Added: trunk/examples/al-admin/app/views/_switcher/_after.rhtml ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/views/_switcher/_after.rhtml Fri Nov 2 22:08:13 2007 @@ -0,0 +1,2 @@ + +<%= switcher_element(prefix) %> Added: trunk/examples/al-admin/app/views/_switcher/_before.rhtml ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/views/_switcher/_before.rhtml Fri Nov 2 22:08:13 2007 @@ -0,0 +1,5 @@ +

+ + <%= title %> +

+
Modified: trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml Fri Nov 2 22:08:13 2007 @@ -1,30 +1,24 @@ -

- - <%= title %> -

-
-<% if attributes.empty? -%> -

<%= _("None") %>

-<% else -%> - - - - - - - +<% switcher(prefix, title) do %> + <% if attributes.empty? -%> +

<%= _("None") %>

+ <% else -%> +
<%= _("Name") %><%= _("Description") %>
+ + + + + + - -<% attributes.sort.each do |attribute| -%> - - - - -<% end -%> + +<% attributes.sort.each do |attribute| -%> + + + + +<% end -%>
<%= _("Name") %><%= _("Description") %>
<%= h(la_(attribute)) %><%= h(lad_(attribute)) %>
<%= h(la_(attribute)) %><%= h(lad_(attribute)) %>
-<% end -%> -
- -<%= switcher_element(prefix) %> +<% end -%> +<% end %> From codesite-noreply at google.com Sat Nov 3 01:13:01 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 02 Nov 2007 22:13:01 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r459 - trunk/examples/al-admin/app/views/object_classes Message-ID: <00163600cf97043dff565d3011571edf@google.com> Author: koutou Date: Fri Nov 2 22:08:59 2007 New Revision: 459 Modified: trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml Log: * fixed indent. Modified: trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml Fri Nov 2 22:08:59 2007 @@ -1,8 +1,8 @@ <% switcher(prefix, title) do %> - <% if attributes.empty? -%> + <% if attributes.empty? %>

<%= _("None") %>

- <% else -%> + <% else %> @@ -12,13 +12,13 @@ -<% attributes.sort.each do |attribute| -%> + <% attributes.sort.each do |attribute| %> -<% end -%> - -
<%= h(la_(attribute)) %> <%= h(lad_(attribute)) %>
-<% end -%> + <% end %> + + + <% end %> <% end %> From codesite-noreply at google.com Sat Nov 3 01:20:02 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 02 Nov 2007 22:20:02 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r460 - in trunk/examples/al-admin: app/views/object_classes public/stylesheets Message-ID: <00163600d1b5043dff6f726abe578375@google.com> Author: koutou Date: Fri Nov 2 22:19:06 2007 New Revision: 460 Modified: trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml trunk/examples/al-admin/app/views/object_classes/show.rhtml trunk/examples/al-admin/public/stylesheets/object-classes.css Log: * showed inherited information. Modified: trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml Fri Nov 2 22:19:06 2007 @@ -7,6 +7,7 @@ <%= _("Name") %> + <%= _("Inherited?") %> <%= _("Description") %> @@ -15,6 +16,9 @@ <% attributes.sort.each do |attribute| %> <%= h(la_(attribute)) %> + + <%= own_attributes.include?(attribute) ? "x" : "o" %> + <%= h(lad_(attribute)) %> <% end %> Modified: trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml Fri Nov 2 22:19:06 2007 @@ -1,24 +1,22 @@ -
- - - - - - - +
<%= _("objectClass name") %><%= _("description") %>
+ + + + + + - + <% object_classes.uniq.sort.each do |object_class| -%> - - - - + + + + <% end -%> - -
<%= _("objectClass name") %><%= _("description") %>
<%= link_to(h(loc_(object_class)), - :controller => "object_classes", - :action => "show", - :id => object_class) %><%=h locd_(object_class) %>
<%= link_to(h(loc_(object_class)), + :controller => "object_classes", + :action => "show", + :id => object_class) %><%=h locd_(object_class) %>
-
+ + <% reset_cycle %> Modified: trunk/examples/al-admin/app/views/object_classes/show.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/show.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/show.rhtml Fri Nov 2 22:19:06 2007 @@ -28,12 +28,14 @@ <%= render(:partial => "attributes", :object => @object_class.must, :locals => {:title => _("Requeired attributes"), - :prefix => "required-attributes"}) %> + :prefix => "required-attributes", + :own_attributes => @object_class.must(false)}) %> <%= render(:partial => "attributes", :object => @object_class.may, :locals => {:title => _("Optional attributes"), - :prefix => "optional-attributes"}) %> + :prefix => "optional-attributes", + :own_attributes => @object_class.may(false)}) %>
From codesite-noreply at google.com Sat Nov 3 02:43:05 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 02 Nov 2007 23:43:05 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r477 - in trunk/examples/al-admin/app: helpers views/_entry views/object_classes Message-ID: <00163600d873043e00987958f7598bc6@google.com> Author: koutou Date: Fri Nov 2 23:30:31 2007 New Revision: 477 Modified: trunk/examples/al-admin/app/helpers/attributes_helper.rb trunk/examples/al-admin/app/helpers/directory_helper.rb trunk/examples/al-admin/app/helpers/object_classes_helper.rb trunk/examples/al-admin/app/helpers/users_helper.rb trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml Log: * link to attribute. Modified: trunk/examples/al-admin/app/helpers/attributes_helper.rb ============================================================================== --- trunk/examples/al-admin/app/helpers/attributes_helper.rb (original) +++ trunk/examples/al-admin/app/helpers/attributes_helper.rb Fri Nov 2 23:30:31 2007 @@ -1,2 +1,8 @@ module AttributesHelper + def link_to_attribute(attribute) + link_to(h(la_(attribute)), + :controller => "attributes", + :action => "show", + :id => attribute) + end end Modified: trunk/examples/al-admin/app/helpers/directory_helper.rb ============================================================================== --- trunk/examples/al-admin/app/helpers/directory_helper.rb (original) +++ trunk/examples/al-admin/app/helpers/directory_helper.rb Fri Nov 2 23:30:31 2007 @@ -1,4 +1,6 @@ module DirectoryHelper + include ObjectClassesHelper + def failed_to_retrieve_entry_message content_tag(:h2, _("Failed to retrieve the entry")) end Modified: trunk/examples/al-admin/app/helpers/object_classes_helper.rb ============================================================================== --- trunk/examples/al-admin/app/helpers/object_classes_helper.rb (original) +++ trunk/examples/al-admin/app/helpers/object_classes_helper.rb Fri Nov 2 23:30:31 2007 @@ -1,2 +1,10 @@ module ObjectClassesHelper + include AttributesHelper + + def link_to_object_class(object_class) + link_to(h(loc_(object_class)), + :controller => "object_classes", + :action => "show", + :id => object_class) + end end Modified: trunk/examples/al-admin/app/helpers/users_helper.rb ============================================================================== --- trunk/examples/al-admin/app/helpers/users_helper.rb (original) +++ trunk/examples/al-admin/app/helpers/users_helper.rb Fri Nov 2 23:30:31 2007 @@ -1,4 +1,6 @@ module UsersHelper + include ObjectClassesHelper + def user_link(user, with_edit=false) user_link_if(true, user, with_edit) end Modified: trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml (original) +++ trunk/examples/al-admin/app/views/_entry/_attributes_information.rhtml Fri Nov 2 23:30:31 2007 @@ -12,7 +12,7 @@ <% (entry.attribute_names(true) - ["objectClass"]).sort.each do |name| -%> - <%= h(la_(name)) %> + <%= link_to_attribute(name) %> <%= h(entry[name, true].join(", ")) %> <%= h(lad_(name)) %> Modified: trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml Fri Nov 2 23:30:31 2007 @@ -15,7 +15,7 @@ <% attributes.sort.each do |attribute| %> - <%= h(la_(attribute)) %> + <%= link_to_attribute(attribute) %> <%= boolean_value(own_attributes.include?(attribute)) %> Modified: trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/_object_classes.rhtml Fri Nov 2 23:30:31 2007 @@ -10,10 +10,7 @@ <% object_classes.uniq.sort.each do |object_class| -%> - <%= link_to(h(loc_(object_class)), - :controller => "object_classes", - :action => "show", - :id => object_class) %> + <%= link_to_object_class(object_class) %> <%=h locd_(object_class) %> <% end -%> From codesite-noreply at google.com Sat Nov 3 02:47:06 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 02 Nov 2007 23:47:06 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r478 - trunk/examples/al-admin/app/controllers Message-ID: <00163600d2c5043e00a6ca5bc059e31c@google.com> Author: koutou Date: Fri Nov 2 23:32:20 2007 New Revision: 478 Modified: trunk/examples/al-admin/app/controllers/attributes_controller.rb Log: * required login for viewing attributes. Modified: trunk/examples/al-admin/app/controllers/attributes_controller.rb ============================================================================== --- trunk/examples/al-admin/app/controllers/attributes_controller.rb (original) +++ trunk/examples/al-admin/app/controllers/attributes_controller.rb Fri Nov 2 23:32:20 2007 @@ -1,4 +1,6 @@ class AttributesController < ApplicationController + before_filter :login_required + def index @attributes = schema.attributes end From codesite-noreply at google.com Sat Nov 3 09:24:12 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Sat, 03 Nov 2007 06:24:12 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r479 - in trunk/examples/al-admin: app/controllers app/helpers app/views/attributes app/views/lay... Message-ID: <00163600d1b5043e0632ee23ac64fed0@google.com> Author: koutou Date: Sat Nov 3 06:23:01 2007 New Revision: 479 Added: trunk/examples/al-admin/app/controllers/syntaxes_controller.rb trunk/examples/al-admin/app/helpers/syntaxes_helper.rb trunk/examples/al-admin/app/views/syntaxes/ trunk/examples/al-admin/app/views/syntaxes/_syntaxes.rhtml trunk/examples/al-admin/app/views/syntaxes/index.rhtml trunk/examples/al-admin/app/views/syntaxes/show.rhtml trunk/examples/al-admin/public/stylesheets/syntaxes.css trunk/examples/al-admin/test/functional/syntaxes_controller_test.rb Modified: trunk/examples/al-admin/app/controllers/attributes_controller.rb trunk/examples/al-admin/app/controllers/object_classes_controller.rb trunk/examples/al-admin/app/views/attributes/_attributes.rhtml trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml trunk/examples/al-admin/config/routes.rb trunk/examples/al-admin/public/stylesheets/base.css Log: * supported syntax list. Modified: trunk/examples/al-admin/app/controllers/attributes_controller.rb ============================================================================== --- trunk/examples/al-admin/app/controllers/attributes_controller.rb (original) +++ trunk/examples/al-admin/app/controllers/attributes_controller.rb Sat Nov 3 06:23:01 2007 @@ -6,7 +6,8 @@ end def show - key = params[:id] + key = params[:id].to_a.flatten.compact[0] + raise ActiveRecord::RecordNotFound if key.nil? @attribute = schema.attributes.find do |attribute| attribute.name == key or attribute.id == key Modified: trunk/examples/al-admin/app/controllers/object_classes_controller.rb ============================================================================== --- trunk/examples/al-admin/app/controllers/object_classes_controller.rb (original) +++ trunk/examples/al-admin/app/controllers/object_classes_controller.rb Sat Nov 3 06:23:01 2007 @@ -6,7 +6,8 @@ end def show - key = params[:id] + key = params[:id].to_a.flatten.compact[0] + raise ActiveRecord::RecordNotFound if key.nil? @object_class = schema.object_classes.find do |object_class| object_class.name == key or object_class.id == key Added: trunk/examples/al-admin/app/controllers/syntaxes_controller.rb ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/controllers/syntaxes_controller.rb Sat Nov 3 06:23:01 2007 @@ -0,0 +1,17 @@ +class SyntaxesController < ApplicationController + before_filter :login_required + + def index + @syntaxes = schema.ldap_syntaxes + end + + def show + key = params[:id].to_a.flatten.compact[0] + raise ActiveRecord::RecordNotFound if key.nil? + @syntax = schema.ldap_syntaxes.find do |syntax| + syntax.name == key or + syntax.id == key + end + raise ActiveRecord::RecordNotFound if @syntax.nil? + end +end Added: trunk/examples/al-admin/app/helpers/syntaxes_helper.rb ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/helpers/syntaxes_helper.rb Sat Nov 3 06:23:01 2007 @@ -0,0 +1,8 @@ +module SyntaxesHelper + def link_to_syntax(syntax) + link_to(h(ls_(syntax)), + :controller => "syntaxes", + :action => "show", + :id => syntax) + end +end Modified: trunk/examples/al-admin/app/views/attributes/_attributes.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/attributes/_attributes.rhtml (original) +++ trunk/examples/al-admin/app/views/attributes/_attributes.rhtml Sat Nov 3 06:23:01 2007 @@ -10,10 +10,7 @@ <% attributes.uniq.sort.each do |attribute| -%> - <%= link_to(h(la_(attribute)), - :controller => "attributes", - :action => "show", - :id => attribute) %> + <%= link_to_attribute(attribute) %> <%= h(lad_(attribute)) %> <% end -%> Modified: trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml (original) +++ trunk/examples/al-admin/app/views/layouts/_main_menu.rhtml Sat Nov 3 06:23:01 2007 @@ -7,6 +7,7 @@ [s_("Menu|Directory"), {:controller => "directory"}], [s_("Menu|objectClass list"), {:controller => "object_classes"}], [s_("Menu|Attribute list"), {:controller => "attributes"}], + [s_("Menu|Syntax list"), {:controller => "syntaxes"}], ].each do |label, options| -%>
  • > <%= link_to(label, options) %> Added: trunk/examples/al-admin/app/views/syntaxes/_syntaxes.rhtml ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/views/syntaxes/_syntaxes.rhtml Sat Nov 3 06:23:01 2007 @@ -0,0 +1,19 @@ + + + + + + + + + + +<% syntaxes.uniq.sort.each do |syntax| -%> + + + + +<% end -%> + +
    <%= _("Syntax name") %><%= _("Description") %>
    <%= link_to_syntax(syntax) %><%= h(lsd_(syntax)) %>
    +<% reset_cycle %> Added: trunk/examples/al-admin/app/views/syntaxes/index.rhtml ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/views/syntaxes/index.rhtml Sat Nov 3 06:23:01 2007 @@ -0,0 +1,3 @@ +

    <%= _("Syntax list") %>

    + +<%= render(:partial => "syntaxes", :object => @syntaxes) %> Added: trunk/examples/al-admin/app/views/syntaxes/show.rhtml ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/views/syntaxes/show.rhtml Sat Nov 3 06:23:01 2007 @@ -0,0 +1,14 @@ + +
    +

    <%= h(ls_(@syntax)) %>

    + <%= h(@syntax.id) %> + +

    <%= _("Description") %>

    +

    <%= h(lsd_(@syntax)) %>

    +
    + + Modified: trunk/examples/al-admin/config/routes.rb ============================================================================== --- trunk/examples/al-admin/config/routes.rb (original) +++ trunk/examples/al-admin/config/routes.rb Sat Nov 3 06:23:01 2007 @@ -29,6 +29,13 @@ # -- just remember to delete public/index.html. lang_map.call(:top, '', :controller => "welcome") + lang_map.call(:connect, 'object_class/*id', + :controller => "object_classes", :action => "show") + lang_map.call(:connect, 'attribute/*id', + :controller => "attributes", :action => "show") + lang_map.call(:connect, 'syntax/*id', + :controller => "syntaxes", :action => "show") + # Allow downloading Web Service WSDL as a file with an extension # instead of a file named 'wsdl' lang_map.call(:connect, ':controller/service.wsdl', :action => 'wsdl') Modified: trunk/examples/al-admin/public/stylesheets/base.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/base.css (original) +++ trunk/examples/al-admin/public/stylesheets/base.css Sat Nov 3 06:23:01 2007 @@ -37,6 +37,7 @@ div#flash-box { position: absolute; + top: 0; left: 0; width: 100%; background-color: #fcfffc; Added: trunk/examples/al-admin/public/stylesheets/syntaxes.css ============================================================================== --- (empty file) +++ trunk/examples/al-admin/public/stylesheets/syntaxes.css Sat Nov 3 06:23:01 2007 @@ -0,0 +1 @@ + at import url("detail.css"); Added: trunk/examples/al-admin/test/functional/syntaxes_controller_test.rb ============================================================================== --- (empty file) +++ trunk/examples/al-admin/test/functional/syntaxes_controller_test.rb Sat Nov 3 06:23:01 2007 @@ -0,0 +1,18 @@ +require File.dirname(__FILE__) + '/../test_helper' +require 'syntaxes_controller' + +# Re-raise errors caught by the controller. +class SyntaxesController; def rescue_action(e) raise e end; end + +class SyntaxesControllerTest < Test::Unit::TestCase + def setup + @controller = SyntaxesController.new + @request = ActionController::TestRequest.new + @response = ActionController::TestResponse.new + end + + # Replace this with your real tests. + def test_truth + assert true + end +end From codesite-noreply at google.com Sat Nov 3 09:35:12 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Sat, 03 Nov 2007 06:35:12 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r480 - trunk/examples/al-admin/app/views/syntaxes Message-ID: <00c09ff7928c043e065a4f422c6574e2@google.com> Author: koutou Date: Sat Nov 3 06:34:24 2007 New Revision: 480 Added: trunk/examples/al-admin/app/views/syntaxes/_detail.rhtml Modified: trunk/examples/al-admin/app/views/syntaxes/show.rhtml Log: * showed details. Added: trunk/examples/al-admin/app/views/syntaxes/_detail.rhtml ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/views/syntaxes/_detail.rhtml Sat Nov 3 06:34:24 2007 @@ -0,0 +1,14 @@ + + + + + + + + + + + + +
    <%= _("Binary tranfer required") %><%= boolean_value(syntax.binary_transfer_required?) %>
    <%= _("Human readable") %><%= boolean_value(syntax.human_readable?) %>
    +<% reset_cycle %> Modified: trunk/examples/al-admin/app/views/syntaxes/show.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/syntaxes/show.rhtml (original) +++ trunk/examples/al-admin/app/views/syntaxes/show.rhtml Sat Nov 3 06:34:24 2007 @@ -5,6 +5,14 @@

    <%= _("Description") %>

    <%= h(lsd_(@syntax)) %>

    + +<% unless @syntax.aliases.empty? -%> + <%= render(:partial => "_schema/aliases", :object => @syntax.aliases) %> +<% end -%> + + <% switcher("syntax-detail", _("Detail")) do %> + <%= render(:partial => "detail", :locals => {:syntax => @syntax}) %> + <% end %> Modified: trunk/examples/al-admin/lib/authenticated_system.rb ============================================================================== --- trunk/examples/al-admin/lib/authenticated_system.rb (original) +++ trunk/examples/al-admin/lib/authenticated_system.rb Sat Nov 3 20:28:33 2007 @@ -5,21 +5,10 @@ def logged_in? current_user != :false end - - def check_connectivity - if logged_in? and !current_user.connected? - self.current_user = :false - end - true - end # Accesses the current user from the session. def current_user @current_user ||= (session[:user] && User.find_by_id(session[:user])) || :false - end - - def current_ldap_user - logged_in? ? current_user.ldap_user : nil end # Store the given user in the session. From codesite-noreply at google.com Sun Nov 4 00:01:15 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Sat, 03 Nov 2007 21:01:15 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r492 - trunk/examples/al-admin/app/controllers Message-ID: <00c09ff7922c043e12738851697d32b8@google.com> Author: koutou Date: Sat Nov 3 21:00:41 2007 New Revision: 492 Modified: trunk/examples/al-admin/app/controllers/users_controller.rb Log: * minor fixes. Modified: trunk/examples/al-admin/app/controllers/users_controller.rb ============================================================================== --- trunk/examples/al-admin/app/controllers/users_controller.rb (original) +++ trunk/examples/al-admin/app/controllers/users_controller.rb Sat Nov 3 21:00:41 2007 @@ -20,7 +20,7 @@ @user = find(params[:id]) previous_user_password = @user.user_password if @user.update_attributes(params[:user]) - if previous_user_password != @user.user_password + if previous_user_password != @user.user_password and @user.connected? @user.bind(@user.password) end flash[:notice] = _('User was successfully updated.') @@ -33,6 +33,6 @@ private def find(*args) - current_user.ldap_user.find(*args) + current_ldap_user.find(*args) end end From codesite-noreply at google.com Sun Nov 4 00:26:18 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Sat, 03 Nov 2007 21:26:18 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r493 - trunk/lib/active_ldap Message-ID: <00163600d06e043e12cd1adafe7427c8@google.com> Author: koutou Date: Sat Nov 3 21:25:54 2007 New Revision: 493 Modified: trunk/lib/active_ldap/operations.rb Log: * ensured setting connection per entry. Modified: trunk/lib/active_ldap/operations.rb ============================================================================== --- trunk/lib/active_ldap/operations.rb (original) +++ trunk/lib/active_ldap/operations.rb Sat Nov 3 21:25:54 2007 @@ -61,8 +61,8 @@ :order => options[:order] || order, } - conn = options[:connection] || connection - conn.search(search_options) do |dn, attrs| + options[:connection] ||= connection + options[:connection].search(search_options) do |dn, attrs| attributes = {} attrs.each do |key, value| normalized_attr, normalized_value = @@ -304,21 +304,21 @@ def dump(options={}) ldifs = [] options = {:base => base, :scope => scope}.merge(options) - conn = options[:connection] || connection - conn.search(options) do |dn, attributes| + options[:connection] ||= connection + options[:connection].search(options) do |dn, attributes| ldifs << to_ldif(dn, attributes) end ldifs.join("\n") end def to_ldif(dn, attributes, options={}) - conn = options[:connection] || connection - conn.to_ldif(dn, unnormalize_attributes(attributes)) + options[:connection] ||= connection + options[:connection].to_ldif(dn, unnormalize_attributes(attributes)) end def load(ldifs, options={}) - conn = options[:connection] || connection - conn.load(ldifs) + options[:connection] ||= connection + options[:connection].load(ldifs) end end @@ -349,14 +349,15 @@ targets = targets.collect do |target| ensure_dn_attribute(ensure_base(target)) end - conn = options[:connection] || connection - conn.delete(targets, options) + options[:connection] ||= connection + options[:connection].delete(targets, options) end def delete_all(filter=nil, options={}) options = {:base => base, :scope => scope}.merge(options) options = options.merge(:filter => filter) if filter - conn = options[:connection] || connection + options[:connection] ||= connection + conn = options[:connection] targets = conn.search(options).collect do |dn, attributes| dn end.sort_by do |dn| @@ -372,16 +373,16 @@ unnormalized_attributes = attributes.collect do |type, key, value| [type, key, unnormalize_attribute(key, value)] end - conn = options[:connection] || connection - conn.add(dn, unnormalized_attributes, options) + options[:connection] ||= connection + options[:connection].add(dn, unnormalized_attributes, options) end def modify_entry(dn, attributes, options={}) unnormalized_attributes = attributes.collect do |type, key, value| [type, key, unnormalize_attribute(key, value)] end - conn = options[:connection] || connection - conn.modify(dn, unnormalized_attributes, options) + options[:connection] ||= connection + options[:connection].modify(dn, unnormalized_attributes, options) end def update(dn, attributes, options={}) @@ -417,7 +418,8 @@ [:replace, normalized_name, unnormalize_attribute(normalized_name, normalized_value)] end - conn = options[:connection] || connection + options[:connection] ||= connection + conn = options[:connection] targets.each do |dn| conn.modify(dn, unnormalized_attributes, options) end From codesite-noreply at google.com Sun Nov 4 01:44:42 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Sat, 03 Nov 2007 23:44:42 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r494 - trunk/lib/active_ldap Message-ID: <00c09ff7922c043e14bc14fe1a81903d@google.com> Author: koutou Date: Sat Nov 3 23:44:16 2007 New Revision: 494 Modified: trunk/lib/active_ldap/base.rb Log: * do nothing for attributes = nil. Modified: trunk/lib/active_ldap/base.rb ============================================================================== --- trunk/lib/active_ldap/base.rb (original) +++ trunk/lib/active_ldap/base.rb Sat Nov 3 23:44:16 2007 @@ -661,9 +661,10 @@ # It is unwise to attempt objectClass updates this way. # Also be sure to only pass in key-value pairs of your choosing. # Do not let URL/form hackers supply the keys. - def attributes=(hash_or_assoc) + def attributes=(new_attributes) + return if new_attributes.nil? _schema = nil - targets = remove_attributes_protected_from_mass_assignment(hash_or_assoc) + targets = remove_attributes_protected_from_mass_assignment(new_attributes) targets.each do |key, value| setter = "#{key}=" unless respond_to?(setter) From codesite-noreply at google.com Sun Nov 4 01:48:42 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Sat, 03 Nov 2007 23:48:42 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r495 - in trunk/examples/al-admin: app/controllers app/helpers app/views/_switcher app/views/user... Message-ID: <00c09ff7922c043e14ca6744a981abc1@google.com> Author: koutou Date: Sat Nov 3 23:45:16 2007 New Revision: 495 Added: trunk/examples/al-admin/app/views/users/_object_classes_update_form.rhtml Modified: trunk/examples/al-admin/app/controllers/users_controller.rb trunk/examples/al-admin/app/helpers/application_helper.rb trunk/examples/al-admin/app/views/_switcher/_after.rhtml trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml trunk/examples/al-admin/app/views/users/_form.rhtml trunk/examples/al-admin/app/views/users/_password_change_form.rhtml trunk/examples/al-admin/public/stylesheets/users.css Log: * supported objectClass change. Modified: trunk/examples/al-admin/app/controllers/users_controller.rb ============================================================================== --- trunk/examples/al-admin/app/controllers/users_controller.rb (original) +++ trunk/examples/al-admin/app/controllers/users_controller.rb Sat Nov 3 23:45:16 2007 @@ -19,6 +19,7 @@ def update @user = find(params[:id]) previous_user_password = @user.user_password + @user.replace_class(params["object-classes"]) if @user.update_attributes(params[:user]) if previous_user_password != @user.user_password and @user.connected? @user.bind(@user.password) @@ -29,6 +30,13 @@ @user.password = @user.password_confirmation = nil render :action => 'edit' end + end + + def update_object_classes + @user = find(params[:id]) + @user.replace_class(params["object-classes"]) + @user.attributes = params[:user] + render(:partial => "attributes_update_form") end private Modified: trunk/examples/al-admin/app/helpers/application_helper.rb ============================================================================== --- trunk/examples/al-admin/app/helpers/application_helper.rb (original) +++ trunk/examples/al-admin/app/helpers/application_helper.rb Sat Nov 3 23:45:16 2007 @@ -18,13 +18,13 @@ "#{flash_box_div}\n#{javascript_tag(javascript_content)}" end - def switcher(prefix, title, &proc) + def switcher(prefix, title, options={}, &proc) concat(render(:partial => "_switcher/before", :locals => {:prefix => prefix, :title => title}), proc.binding) yield concat(render(:partial => "_switcher/after", - :locals => {:prefix => prefix}), + :locals => {:prefix => prefix, :options => options}), proc.binding) end Modified: trunk/examples/al-admin/app/views/_switcher/_after.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/_switcher/_after.rhtml (original) +++ trunk/examples/al-admin/app/views/_switcher/_after.rhtml Sat Nov 3 23:45:16 2007 @@ -1,2 +1,2 @@ -<%= switcher_element(prefix) %> +<%= switcher_element(prefix, options) %> Modified: trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml (original) +++ trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml Sat Nov 3 23:45:16 2007 @@ -3,30 +3,28 @@ required_attributes = @user.must.collect(&:name) %> -

    <%= _("Update attributes") %>

    +<% switcher("attributes", _("Update attributes")) do %> + + + + + + + + -
    <%= _("attribute name") %><%= _("value") %><%= _("description") %>
    - - - - - + <% names.sort.each do |name| %> + + + + - - -<% names.sort.each do |name| -%> - - - - - + <% end %> +
    <%= _("attribute name") %><%= _("value") %><%= _("description") %>
    + + <%= link_to("?", attribute_url_for_options(name)) %> + <% if required_attributes.include?(name) %> + * + <% end %> + <%= text_field("user", name) %><%= h lad_(name) %>
    - - <%= link_to("?", attribute_url_for_options(name)) %> -<% if required_attributes.include?(name) -%> - * -<% end -%> - <%= text_field("user", name) %><%= h lad_(name) %>
    <% end -%> - - -<%= submit_tag(s_('Command|Update')) %> Modified: trunk/examples/al-admin/app/views/users/_form.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/users/_form.rhtml (original) +++ trunk/examples/al-admin/app/views/users/_form.rhtml Sat Nov 3 23:45:16 2007 @@ -1,5 +1,13 @@ - +<% attributes_form_id = "attributes-form" %> <%= error_messages_for "user" %> <%= render(:partial => "password_change_form") %> -<%= render(:partial => "attributes_update_form") %> +<%= submit_tag(s_('Command|Update')) %> + +<%= render(:partial => "object_classes_update_form", + :locals => {:attributes_form_id => attributes_form_id}) %> + +
    + <%= render(:partial => "attributes_update_form") %> +
    +<%= submit_tag(s_('Command|Update')) %> Added: trunk/examples/al-admin/app/views/users/_object_classes_update_form.rhtml ============================================================================== --- (empty file) +++ trunk/examples/al-admin/app/views/users/_object_classes_update_form.rhtml Sat Nov 3 23:45:16 2007 @@ -0,0 +1,40 @@ +<% + using_object_classes = @user.classes + available_object_classes = @user.schema.object_classes.collect(&:name) +%> + +<% switcher("object-classes", _("Update objectClasses")) do %> + + + + + + + + + + +<% available_object_classes.uniq.sort.each do |object_class| -%> + + + + + +<% end -%> + +
    <%= _("Use") %><%= _("objectClass name") %><%= _("Description") %>
    + <%= check_box_tag("object-classes[]", + object_class, + using_object_classes.include?(object_class), + :id => "object-class-#{object_class}", + :onchange => "updateAttributesForm(this.form)") %> + <%= link_to_object_class(object_class) %><%=h locd_(object_class) %>
    + <% reset_cycle %> +<% end %> + +<%= javascript_tag("function updateAttributesForm(form) {" + + remote_function(:update => attributes_form_id, + :url => {:action => :update_object_classes, + :id => @user}, + :with => 'Form.serialize(form)') + + "}") %> Modified: trunk/examples/al-admin/app/views/users/_password_change_form.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/users/_password_change_form.rhtml (original) +++ trunk/examples/al-admin/app/views/users/_password_change_form.rhtml Sat Nov 3 23:45:16 2007 @@ -18,5 +18,3 @@ <%= password_field("user", "password_confirmation") %> - -<%= submit_tag(s_('Command|Update')) %> Modified: trunk/examples/al-admin/public/stylesheets/users.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/users.css (original) +++ trunk/examples/al-admin/public/stylesheets/users.css Sat Nov 3 23:45:16 2007 @@ -1,6 +1,13 @@ @import url("detail.css"); -form table +form > table { margin: 1em; +} + +form div.switcher-content +{ + height: 20em; + overflow: auto; + margin: 1em 0; } From codesite-noreply at google.com Sun Nov 4 01:53:42 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Sat, 03 Nov 2007 23:53:42 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r496 - in trunk/examples/al-admin: app/controllers app/views/users public/stylesheets Message-ID: <00c09ffb4bcf043e14dc4a9a8b8140b0@google.com> Author: koutou Date: Sat Nov 3 23:53:08 2007 New Revision: 496 Modified: trunk/examples/al-admin/app/controllers/users_controller.rb trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml trunk/examples/al-admin/app/views/users/_object_classes_update_form.rhtml trunk/examples/al-admin/app/views/users/_password_change_form.rhtml trunk/examples/al-admin/public/stylesheets/users.css Log: * improved UI. Modified: trunk/examples/al-admin/app/controllers/users_controller.rb ============================================================================== --- trunk/examples/al-admin/app/controllers/users_controller.rb (original) +++ trunk/examples/al-admin/app/controllers/users_controller.rb Sat Nov 3 23:53:08 2007 @@ -35,7 +35,12 @@ def update_object_classes @user = find(params[:id]) @user.replace_class(params["object-classes"]) - @user.attributes = params[:user] + available_attributes = @user.attribute_names(true) + attributes = {} + (params[:user] || {}).each do |key, value| + attributes[key] = value if available_attributes.include?(key) + end + @user.attributes = attributes render(:partial => "attributes_update_form") end Modified: trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml (original) +++ trunk/examples/al-admin/app/views/users/_attributes_update_form.rhtml Sat Nov 3 23:53:08 2007 @@ -3,28 +3,28 @@ required_attributes = @user.must.collect(&:name) %> -<% switcher("attributes", _("Update attributes")) do %> - - - - - - - - +

    <%= _("Update attributes") %>

    - <% names.sort.each do |name| %> - - - - +
    <%= _("attribute name") %><%= _("value") %><%= _("description") %>
    - - <%= link_to("?", attribute_url_for_options(name)) %> - <% if required_attributes.include?(name) %> - * - <% end %> - <%= text_field("user", name) %><%= h lad_(name) %>
    + + + + + - <% end %> -
    <%= _("attribute name") %><%= _("value") %><%= _("description") %>
    + + +<% names.sort.each do |name| -%> + + + + <%= link_to("?", attribute_url_for_options(name)) %> +<% if required_attributes.include?(name) -%> + * +<% end -%> + + <%= text_field("user", name) %> + <%= h lad_(name) %> + <% end -%> + Modified: trunk/examples/al-admin/app/views/users/_object_classes_update_form.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/users/_object_classes_update_form.rhtml (original) +++ trunk/examples/al-admin/app/views/users/_object_classes_update_form.rhtml Sat Nov 3 23:53:08 2007 @@ -4,7 +4,7 @@ %> <% switcher("object-classes", _("Update objectClasses")) do %> - +
    Modified: trunk/examples/al-admin/app/views/users/_password_change_form.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/users/_password_change_form.rhtml (original) +++ trunk/examples/al-admin/app/views/users/_password_change_form.rhtml Sat Nov 3 23:53:08 2007 @@ -1,7 +1,7 @@

    <%= _("Change password") %>

    -
    <%= _("Use") %>
    +
    From codesite-noreply at google.com Sun Nov 4 02:09:44 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Sun, 04 Nov 2007 00:09:44 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r500 - trunk/examples/al-admin/po/ja Message-ID: <00163600d06e043e15159cb252788e4c@google.com> Author: koutou Date: Sun Nov 4 00:03:02 2007 New Revision: 500 Modified: trunk/examples/al-admin/po/ja/al-admin.po Log: * updated messages. Modified: trunk/examples/al-admin/po/ja/al-admin.po ============================================================================== --- trunk/examples/al-admin/po/ja/al-admin.po (original) +++ trunk/examples/al-admin/po/ja/al-admin.po Sun Nov 4 00:03:02 2007 @@ -7,7 +7,7 @@ msgstr "" "Project-Id-Version: AL Admin 0.8.4\n" "POT-Creation-Date: 2007-11-04 15:53+0900\n" -"PO-Revision-Date: 2007-11-04 15:54+0900\n" +"PO-Revision-Date: 2007-11-04 16:02+0900\n" "Last-Translator: Kouhei Sutou \n" "Language-Team: Japanese\n" "MIME-Version: 1.0\n" @@ -200,7 +200,7 @@ #: app/views/object_classes/_attributes.rhtml:10 msgid "Inherited" -msgstr "$B7Q>5(B" +msgstr "$B7Q>5$5$l$?B0 at -(B" #: app/views/users/edit.rhtml:12 msgid "Menu|Show" From codesite-noreply at google.com Sun Nov 4 08:26:38 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Sun, 04 Nov 2007 05:26:38 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r501 - trunk Message-ID: <00c09ff7928c043e1a597adcad8bc141@google.com> Author: koutou Date: Sun Nov 4 05:26:28 2007 New Revision: 501 Modified: trunk/TODO Log: * added an entry to TODO for 0.9.x series. Modified: trunk/TODO ============================================================================== --- trunk/TODO (original) +++ trunk/TODO Sun Nov 4 05:26:28 2007 @@ -1,3 +1,6 @@ +- Provide FormHelper for LDAP entry's attribute to handle multiple values + (["foo", "bar", ...]) and option value ({"binary" => "..."}, + {"lang-en-us" => "..."}) - Test SASL bind. - Add result pagination via LDAP::Controls - serialize & serialized_attributes From codesite-noreply at google.com Sun Nov 4 08:54:43 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Sun, 04 Nov 2007 05:54:43 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r502 - in trunk: lib/active_ldap test Message-ID: <00163600d2c5043e1abdf0eb568c3d9c@google.com> Author: koutou Date: Sun Nov 4 05:53:45 2007 New Revision: 502 Added: trunk/lib/active_ldap/ldif.rb trunk/test/test_ldif.rb Modified: trunk/lib/active_ldap/base.rb Log: * started LDIF implementation. PLEASE IGNORE THIS FOR NOW! Modified: trunk/lib/active_ldap/base.rb ============================================================================== --- trunk/lib/active_ldap/base.rb (original) +++ trunk/lib/active_ldap/base.rb Sun Nov 4 05:53:45 2007 @@ -122,6 +122,20 @@ class DistinguishedNameNotSetError < Error end + class LdifInvalid < Error + attr_reader :ldif, :reason + def initialize(ldif, reason=nil) + @ldif = ldif + @reason = reason + if @reason + message = _("%s is invalid LDIF: %s") % [@ldif, @reason] + else + message = _("%s is invalid LDIF") % @ldif + end + super(message) + end + end + class EntryNotSaved < Error end Added: trunk/lib/active_ldap/ldif.rb ============================================================================== --- (empty file) +++ trunk/lib/active_ldap/ldif.rb Sun Nov 4 05:53:45 2007 @@ -0,0 +1,52 @@ +# Experimental work-in-progress LDIF implementation. +# Don't care this file for now. + +require 'strscan' + +module ActiveLdap + class Ldif + include GetTextSupport + + class Parser + include GetTextSupport + + attr_reader :ldif + def initialize(source) + @ldif = nil + source = source.to_s if source.is_a?(LDIF) + @source = source + end + + def parse + return @ldif if @ldif + + scanner = StringScanner.new(@source) + raise version_spec_is_missing unless scanner.scan(/version:\s*(\d+)/) + + version = Integer(scanner[1]) + raise unsupported_version(version) if version != "1" + end + + private + def invalid_ldif(reason) + LdifInvalid.new(@source, reason) + end + + def version_spec_is_missing + invalid_ldif(_("version spec is missing")) + end + + def unsupported_version(version) + invalid_ldif(_("unsupported version: %d") % version) + end + end + + class << self + def parse(ldif) + Parser.new(ldif).parse + end + end + end + + LDIF = Ldif +end Added: trunk/test/test_ldif.rb ============================================================================== --- (empty file) +++ trunk/test/test_ldif.rb Sun Nov 4 05:53:45 2007 @@ -0,0 +1,35 @@ +require 'al-test-utils' + +class TestLDIF < Test::Unit::TestCase + include AlTestUtils + + def setup + end + + def teardown + end + + priority :must + def test_version_number + assert_invalid_ldif("unsupported version: 0", "version: 0") + assert_invalid_ldif("unsupported version: 0", "version: 0") + end + + def test_version_spec + assert_invalid_ldif("version spec is missing", "") + assert_invalid_ldif("version spec is missing", "version:") + assert_invalid_ldif("version spec is missing", "version: ") + assert_invalid_ldif("version spec is missing", "version: XXX") + end + + priority :normal + + private + def assert_invalid_ldif(reason, ldif) + exception = assert_raise(ActiveLdap::LdifInvalid) do + ActiveLdap::Ldif.parse(ldif) + end + assert_equal(ldif, exception.ldif) + assert_equal(_(reason), exception.reason) + end +end From codesite-noreply at google.com Fri Nov 16 12:21:30 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 16 Nov 2007 09:21:30 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r503 - in trunk: . examples/al-admin/po/en examples/al-admin/po/ja examples/al-admin/po/nl lib po... Message-ID: <00c09ffb4bcf043f0f078d256ead979@google.com> Author: wad Date: Fri Nov 16 09:20:32 2007 New Revision: 503 Modified: trunk/CHANGES trunk/Rakefile trunk/examples/al-admin/po/en/al-admin.po trunk/examples/al-admin/po/ja/al-admin.po trunk/examples/al-admin/po/nl/al-admin.po trunk/lib/active_ldap.rb trunk/po/en/active-ldap.po trunk/po/ja/active-ldap.po Log: update version number for 0.9.0 release; update my contact email Modified: trunk/CHANGES ============================================================================== --- trunk/CHANGES (original) +++ trunk/CHANGES Fri Nov 16 09:20:32 2007 @@ -1,4 +1,4 @@ -0.8.4: +0.9.0: * Improved DN handling. * Supported attribute value validation by LDAP schema. * Changed RubyGems name: ruby-activeldap -> activeldap. Modified: trunk/Rakefile ============================================================================== --- trunk/Rakefile (original) +++ trunk/Rakefile Fri Nov 16 09:20:32 2007 @@ -47,7 +47,7 @@ project = Hoe.new('activeldap', ActiveLdap::VERSION) do |project| project.rubyforge_name = 'ruby-activeldap' project.author = ['Will Drewry', 'Kouhei Sutou'] - project.email = ['will at alum.bu.edu', 'kou at cozmixng.org'] + project.email = ['redpig at dataspill.org', 'kou at cozmixng.org'] project.summary = 'Ruby/ActiveLdap is a object-oriented API to LDAP' project.url = 'http://rubyforge.org/projects/ruby-activeldap/' project.test_globs = ['test/test_*.rb'] Modified: trunk/examples/al-admin/po/en/al-admin.po ============================================================================== --- trunk/examples/al-admin/po/en/al-admin.po (original) +++ trunk/examples/al-admin/po/en/al-admin.po Fri Nov 16 09:20:32 2007 @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: AL Admin 0.8.4\n" +"Project-Id-Version: AL Admin 0.9.0\n" "POT-Creation-Date: 2007-11-04 15:53+0900\n" "PO-Revision-Date: 2007-08-19 09:44+0900\n" "Last-Translator: Kouhei Sutou \n" Modified: trunk/examples/al-admin/po/ja/al-admin.po ============================================================================== --- trunk/examples/al-admin/po/ja/al-admin.po (original) +++ trunk/examples/al-admin/po/ja/al-admin.po Fri Nov 16 09:20:32 2007 @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: AL Admin 0.8.4\n" +"Project-Id-Version: AL Admin 0.9.0\n" "POT-Creation-Date: 2007-11-04 15:53+0900\n" "PO-Revision-Date: 2007-11-04 16:02+0900\n" "Last-Translator: Kouhei Sutou \n" Modified: trunk/examples/al-admin/po/nl/al-admin.po ============================================================================== --- trunk/examples/al-admin/po/nl/al-admin.po (original) +++ trunk/examples/al-admin/po/nl/al-admin.po Fri Nov 16 09:20:32 2007 @@ -6,7 +6,7 @@ # Ace Suares , 2007. msgid "" msgstr "" -"Project-Id-Version: AL Admin 0.8.4\n" +"Project-Id-Version: AL Admin 0.9.0\n" "POT-Creation-Date: 2007-11-04 15:53+0900\n" "PO-Revision-Date: 2007-08-24 22:03+0900\n" "Last-Translator: Ace Suares \n" Modified: trunk/lib/active_ldap.rb ============================================================================== --- trunk/lib/active_ldap.rb (original) +++ trunk/lib/active_ldap.rb Fri Nov 16 09:20:32 2007 @@ -921,7 +921,7 @@ end module ActiveLdap - VERSION = "0.8.4" + VERSION = "0.9.0" end if RUBY_PLATFORM.match('linux') Modified: trunk/po/en/active-ldap.po ============================================================================== --- trunk/po/en/active-ldap.po (original) +++ trunk/po/en/active-ldap.po Fri Nov 16 09:20:32 2007 @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Ruby/ActiveLdap 0.8.4\n" +"Project-Id-Version: Ruby/ActiveLdap 0.9.0\n" "POT-Creation-Date: 2007-11-04 12:09+0900\n" "PO-Revision-Date: 2007-08-19 09:49+0900\n" "Last-Translator: Kouhei Sutou \n" Modified: trunk/po/ja/active-ldap.po ============================================================================== --- trunk/po/ja/active-ldap.po (original) +++ trunk/po/ja/active-ldap.po Fri Nov 16 09:20:32 2007 @@ -5,7 +5,7 @@ # msgid "" msgstr "" -"Project-Id-Version: Ruby/ActiveLdap 0.8.4\n" +"Project-Id-Version: Ruby/ActiveLdap 0.9.0\n" "POT-Creation-Date: 2007-11-04 12:09+0900\n" "PO-Revision-Date: 2007-11-04 12:10+0900\n" "Last-Translator: Kouhei Sutou \n" From codesite-noreply at google.com Fri Nov 16 13:13:42 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 16 Nov 2007 10:13:42 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r504 - tags/r0.9.0 Message-ID: <00c09ff7928c043f0fc241c76cafd71@google.com> Author: wad Date: Fri Nov 16 10:13:07 2007 New Revision: 504 Added: tags/r0.9.0/ - copied from r503, /trunk/ Log: New release tag From codesite-noreply at google.com Fri Nov 16 21:40:37 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 16 Nov 2007 18:40:37 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r505 - trunk Message-ID: <00163600d06e043f16d718e9a3cbd1e@google.com> Author: koutou Date: Fri Nov 16 18:40:25 2007 New Revision: 505 Modified: trunk/Rakefile Log: * handled top directory. Modified: trunk/Rakefile ============================================================================== --- trunk/Rakefile (original) +++ trunk/Rakefile Fri Nov 16 18:40:25 2007 @@ -23,9 +23,10 @@ [ "rails/plugin/active_ldap/generators/scaffold_al/templates/ldap.yml" ] -Find.find(base_dir) do |target| +Find.find(base_dir + File::SEPARATOR) do |target| target = truncate_base_dir[target] components = target.split(File::SEPARATOR) + next if components.empty? if components.size == 1 and !File.directory?(target) next unless base_dir_included_components.include?(components[0]) end From codesite-noreply at google.com Mon Nov 19 08:52:55 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Mon, 19 Nov 2007 05:52:55 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r506 - in trunk: lib/active_ldap test Message-ID: <00c09ff7928c043f48771d247616c1b9@google.com> Author: koutou Date: Mon Nov 19 05:52:06 2007 New Revision: 506 Modified: trunk/lib/active_ldap/ldif.rb trunk/test/test_ldif.rb Log: * supported LDIF version parsing. Modified: trunk/lib/active_ldap/ldif.rb ============================================================================== --- trunk/lib/active_ldap/ldif.rb (original) +++ trunk/lib/active_ldap/ldif.rb Mon Nov 19 05:52:06 2007 @@ -24,7 +24,9 @@ raise version_spec_is_missing unless scanner.scan(/version:\s*(\d+)/) version = Integer(scanner[1]) - raise unsupported_version(version) if version != "1" + raise unsupported_version(version) if version != 1 + + @ldif = LDIF.new(version) end private @@ -45,6 +47,11 @@ def parse(ldif) Parser.new(ldif).parse end + end + + attr_reader :version + def initialize(version) + @version = version end end Modified: trunk/test/test_ldif.rb ============================================================================== --- trunk/test/test_ldif.rb (original) +++ trunk/test/test_ldif.rb Mon Nov 19 05:52:06 2007 @@ -11,8 +11,10 @@ priority :must def test_version_number + assert_valid_version(1, "version: 1") + assert_invalid_ldif("unsupported version: 0", "version: 0") - assert_invalid_ldif("unsupported version: 0", "version: 0") + assert_invalid_ldif("unsupported version: 2", "version: 2") end def test_version_spec @@ -25,6 +27,11 @@ priority :normal private + def assert_valid_version(version, ldif_source) + ldif = ActiveLdap::Ldif.parse(ldif_source) + assert_equal(version, ldif.version) + end + def assert_invalid_ldif(reason, ldif) exception = assert_raise(ActiveLdap::LdifInvalid) do ActiveLdap::Ldif.parse(ldif) From codesite-noreply at google.com Mon Nov 19 09:00:57 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Mon, 19 Nov 2007 06:00:57 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r507 - in trunk: lib/active_ldap test Message-ID: <00163600cf97043f4893dea9a516e39a@google.com> Author: koutou Date: Mon Nov 19 05:59:59 2007 New Revision: 507 Modified: trunk/lib/active_ldap/ldif.rb trunk/test/test_ldif.rb Log: * supported 'dn:' parsing in LDIF. Modified: trunk/lib/active_ldap/ldif.rb ============================================================================== --- trunk/lib/active_ldap/ldif.rb (original) +++ trunk/lib/active_ldap/ldif.rb Mon Nov 19 05:59:59 2007 @@ -17,6 +17,7 @@ @source = source end + SEPARATOR = /(?:\r\n|\n)/ def parse return @ldif if @ldif @@ -26,6 +27,10 @@ version = Integer(scanner[1]) raise unsupported_version(version) if version != 1 + raise separator_is_missing unless scanner.scan(/#{SEPARATOR}+/) + + raise dn_mark_is_missing unless scanner.scan(/dn:/) + @ldif = LDIF.new(version) end @@ -40,6 +45,14 @@ def unsupported_version(version) invalid_ldif(_("unsupported version: %d") % version) + end + + def separator_is_missing + invalid_ldif(_("separator is missing")) + end + + def dn_mark_is_missing + invalid_ldif(_("'dn:' is missing")) end end Modified: trunk/test/test_ldif.rb ============================================================================== --- trunk/test/test_ldif.rb (original) +++ trunk/test/test_ldif.rb Mon Nov 19 05:59:59 2007 @@ -10,8 +10,14 @@ end priority :must + def test_dn_spec + assert_invalid_ldif("'dn:' is missing", "version: 1\n") + end + def test_version_number - assert_valid_version(1, "version: 1") + assert_valid_version(1, "version: 1\ndn:") + assert_valid_version(1, "version: 1\r\ndn:") + assert_valid_version(1, "version: 1\r\n\n\r\n\ndn:") assert_invalid_ldif("unsupported version: 0", "version: 0") assert_invalid_ldif("unsupported version: 2", "version: 2") From codesite-noreply at google.com Mon Nov 19 09:25:09 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Mon, 19 Nov 2007 06:25:09 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r508 - in trunk: lib/active_ldap test Message-ID: <00c09ff7928c043f48ea5eb8fb16d9fc@google.com> Author: koutou Date: Mon Nov 19 06:24:25 2007 New Revision: 508 Modified: trunk/lib/active_ldap/ldif.rb trunk/test/test_ldif.rb Log: * supported dn: value parsing. Modified: trunk/lib/active_ldap/ldif.rb ============================================================================== --- trunk/lib/active_ldap/ldif.rb (original) +++ trunk/lib/active_ldap/ldif.rb Mon Nov 19 06:24:25 2007 @@ -30,11 +30,24 @@ raise separator_is_missing unless scanner.scan(/#{SEPARATOR}+/) raise dn_mark_is_missing unless scanner.scan(/dn:/) + if scanner.scan(/:/) + dn = parse_dn(read_base64_value(scanner)) + elsif scanner.scan(/\s*(.+)$/) + dn = parse_dn(scanner[1]) + else + dn_is_missing + end - @ldif = LDIF.new(version) + @ldif = LDIF.new(version, [Entry.new(dn)]) end private + def parse_dn(dn_string) + DN.parse(dn_string).to_s + rescue DistinguishedNameInvalid + invalid_ldif(_("DN is invalid: %s: %s") % [dn_string, $!.reason]) + end + def invalid_ldif(reason) LdifInvalid.new(@source, reason) end @@ -54,6 +67,10 @@ def dn_mark_is_missing invalid_ldif(_("'dn:' is missing")) end + + def dn_is_missing + invalid_ldif(_("DN is missing")) + end end class << self @@ -62,9 +79,17 @@ end end - attr_reader :version - def initialize(version) + attr_reader :version, :entries + def initialize(version, entries) @version = version + @entries = entries + end + + class Entry + attr_reader :dn + def initialize(dn) + @dn = dn + end end end Modified: trunk/test/test_ldif.rb ============================================================================== --- trunk/test/test_ldif.rb (original) +++ trunk/test/test_ldif.rb Mon Nov 19 06:24:25 2007 @@ -12,6 +12,11 @@ priority :must def test_dn_spec assert_invalid_ldif("'dn:' is missing", "version: 1\n") + + assert_valid_dn("cn=Barbara Jensen,ou=Product Development,dc=example,dc=com", + "version: 1\n" + + "dn: cn=Barbara Jensen, ou=Product Development, " + + "dc=example, dc=com") end def test_version_number @@ -33,6 +38,11 @@ priority :normal private + def assert_valid_dn(dn, ldif_source) + ldif = ActiveLdap::Ldif.parse(ldif_source) + assert_equal([dn], ldif.entries.collect {|entry| entry.dn}) + end + def assert_valid_version(version, ldif_source) ldif = ActiveLdap::Ldif.parse(ldif_source) assert_equal(version, ldif.version) From codesite-noreply at google.com Mon Nov 19 09:41:12 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Mon, 19 Nov 2007 06:41:12 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r509 - in trunk: lib/active_ldap test Message-ID: <00163600d873043f4923cd1c7a16fd48@google.com> Author: koutou Date: Mon Nov 19 06:40:52 2007 New Revision: 509 Modified: trunk/lib/active_ldap/ldif.rb trunk/test/test_ldif.rb Log: * supported Base64 encoded DN value. Modified: trunk/lib/active_ldap/ldif.rb ============================================================================== --- trunk/lib/active_ldap/ldif.rb (original) +++ trunk/lib/active_ldap/ldif.rb Mon Nov 19 06:40:52 2007 @@ -2,6 +2,7 @@ # Don't care this file for now. require 'strscan' +require 'base64' module ActiveLdap class Ldif @@ -30,7 +31,7 @@ raise separator_is_missing unless scanner.scan(/#{SEPARATOR}+/) raise dn_mark_is_missing unless scanner.scan(/dn:/) - if scanner.scan(/:/) + if scanner.scan(/:\s*/) dn = parse_dn(read_base64_value(scanner)) elsif scanner.scan(/\s*(.+)$/) dn = parse_dn(scanner[1]) @@ -42,6 +43,13 @@ end private + def read_base64_value(scanner) + value = scanner.scan(/(?:[a-zA-Z0-9\+\/=]|#{SEPARATOR} )+/) + raise base64_encoded_value_is_missing if value.nil? + + Base64.decode64(value.gsub(/#{SEPARATOR} /, '')).chomp + end + def parse_dn(dn_string) DN.parse(dn_string).to_s rescue DistinguishedNameInvalid @@ -70,6 +78,10 @@ def dn_is_missing invalid_ldif(_("DN is missing")) + end + + def base64_encoded_value_is_missing + invalid_ldif(_("Base64 encoded value is missing")) end end Modified: trunk/test/test_ldif.rb ============================================================================== --- trunk/test/test_ldif.rb (original) +++ trunk/test/test_ldif.rb Mon Nov 19 06:40:52 2007 @@ -17,6 +17,9 @@ "version: 1\n" + "dn: cn=Barbara Jensen, ou=Product Development, " + "dc=example, dc=com") + dn = "cn=Barbara Jensen,ou=Product Development,dc=example,dc=com" + encoded_dn = Base64.encode64(dn).gsub(/\n/, "\n ") + assert_valid_dn(dn, "version: 1\ndn:: #{encoded_dn}") end def test_version_number From codesite-noreply at google.com Mon Nov 19 09:45:13 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Mon, 19 Nov 2007 06:45:13 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r510 - in trunk: lib/active_ldap test Message-ID: <00163600cf97043f49322e81a71707c4@google.com> Author: koutou Date: Mon Nov 19 06:45:02 2007 New Revision: 510 Modified: trunk/lib/active_ldap/ldif.rb trunk/test/test_ldif.rb Log: * supported SEPARATOR after dn-spec. Modified: trunk/lib/active_ldap/ldif.rb ============================================================================== --- trunk/lib/active_ldap/ldif.rb (original) +++ trunk/lib/active_ldap/ldif.rb Mon Nov 19 06:45:02 2007 @@ -33,11 +33,14 @@ raise dn_mark_is_missing unless scanner.scan(/dn:/) if scanner.scan(/:\s*/) dn = parse_dn(read_base64_value(scanner)) - elsif scanner.scan(/\s*(.+)$/) - dn = parse_dn(scanner[1]) else - dn_is_missing + scanner.scan(/\s*/) + dn = scanner.scan(/.+$/) + raise dn_is_missing if dn.nil? + dn = parse_dn(dn) end + + raise separator_is_missing unless scanner.scan(SEPARATOR) @ldif = LDIF.new(version, [Entry.new(dn)]) end Modified: trunk/test/test_ldif.rb ============================================================================== --- trunk/test/test_ldif.rb (original) +++ trunk/test/test_ldif.rb Mon Nov 19 06:45:02 2007 @@ -12,20 +12,23 @@ priority :must def test_dn_spec assert_invalid_ldif("'dn:' is missing", "version: 1\n") + assert_invalid_ldif("DN is missing", "version: 1\ndn:") + assert_invalid_ldif("DN is missing", "version: 1\ndn:\n") + assert_invalid_ldif("DN is missing", "version: 1\ndn: \n") assert_valid_dn("cn=Barbara Jensen,ou=Product Development,dc=example,dc=com", "version: 1\n" + "dn: cn=Barbara Jensen, ou=Product Development, " + - "dc=example, dc=com") + "dc=example, dc=com\n") dn = "cn=Barbara Jensen,ou=Product Development,dc=example,dc=com" encoded_dn = Base64.encode64(dn).gsub(/\n/, "\n ") - assert_valid_dn(dn, "version: 1\ndn:: #{encoded_dn}") + assert_valid_dn(dn, "version: 1\ndn:: #{encoded_dn}\n") end def test_version_number - assert_valid_version(1, "version: 1\ndn:") - assert_valid_version(1, "version: 1\r\ndn:") - assert_valid_version(1, "version: 1\r\n\n\r\n\ndn:") + assert_valid_version(1, "version: 1\ndn: dc=com\n") + assert_valid_version(1, "version: 1\r\ndn: dc=com\n") + assert_valid_version(1, "version: 1\r\n\n\r\n\ndn: dc=com\n") assert_invalid_ldif("unsupported version: 0", "version: 0") assert_invalid_ldif("unsupported version: 2", "version: 2") From codesite-noreply at google.com Tue Nov 20 16:17:40 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Tue, 20 Nov 2007 13:17:40 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r512 - in trunk: lib/active_ldap test Message-ID: <00c09ffb5002043f62cb88b8681d6c45@google.com> Author: koutou Date: Tue Nov 20 05:02:51 2007 New Revision: 512 Modified: trunk/lib/active_ldap/ldif.rb trunk/test/test_ldif.rb Log: * supported multi entries. Modified: trunk/lib/active_ldap/ldif.rb ============================================================================== --- trunk/lib/active_ldap/ldif.rb (original) +++ trunk/lib/active_ldap/ldif.rb Tue Nov 20 05:02:51 2007 @@ -34,21 +34,9 @@ raise separator_is_missing unless scanner.scan(/#{SEPARATOR}+/) - raise dn_mark_is_missing unless scanner.scan(/dn:/) - if scanner.scan(/:\s*/) - dn = parse_dn(read_base64_value(scanner)) - else - scanner.scan(/\s*/) - dn = scanner.scan(/.+$/) - raise dn_is_missing if dn.nil? - dn = parse_dn(dn) - end - - raise separator_is_missing unless scanner.scan(SEPARATOR) - - attributes = parse_attributes(scanner) + entries = parse_entries(scanner) - @ldif = LDIF.new(version, [Entry.new(dn, attributes)]) + @ldif = LDIF.new(version, entries) end private @@ -107,6 +95,33 @@ scanner.scan(/\s*/) scanner.scan(/#{SAFE_STRING}?/) end + end + + def parse_entry(scanner) + raise dn_mark_is_missing unless scanner.scan(/dn:/) + if scanner.scan(/:\s*/) + dn = parse_dn(read_base64_value(scanner)) + else + scanner.scan(/\s*/) + dn = scanner.scan(/.+$/) + raise dn_is_missing if dn.nil? + dn = parse_dn(dn) + end + + raise separator_is_missing unless scanner.scan(SEPARATOR) + + attributes = parse_attributes(scanner) + + Entry.new(dn, attributes) + end + + def parse_entries(scanner) + entries = [] + entries << parse_entry(scanner) + until scanner.eos? + entries << parse_entry(scanner) + end + entries end def invalid_ldif(reason) Modified: trunk/test/test_ldif.rb ============================================================================== --- trunk/test/test_ldif.rb (original) +++ trunk/test/test_ldif.rb Tue Nov 20 05:02:51 2007 @@ -10,7 +10,50 @@ end priority :must - def test_attribute_value_spec + def test_entries + ldif_source = <<-EOL +version: 1 +dn: cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com +objectclass: top +objectclass: person +objectclass: organizationalPerson +cn: Barbara Jensen +cn: Barbara J Jensen +cn: Babs Jensen +sn: Jensen +uid: bjensen +telephonenumber: +1 408 555 1212 +description: A big sailing fan. + +dn: cn=Bjorn Jensen, ou=Accounting, dc=airius, dc=com +objectclass: top +objectclass: person +objectclass: organizationalPerson +cn: Bjorn Jensen +sn: Jensen +telephonenumber: +1 408 555 1212 +EOL + + entry1 = { + "dn" => "cn=Barbara Jensen,ou=Product Development,dc=airius,dc=com", + "objectclass" => ["top", "person", "organizationalPerson"], + "cn" => ["Barbara Jensen", "Barbara J Jensen", "Babs Jensen"], + "sn" => ["Jensen"], + "uid" => ["bjensen"], + "telephonenumber" => ["+1 408 555 1212"], + "description" => ["A big sailing fan."], + } + entry2 = { + "dn" => "cn=Bjorn Jensen,ou=Accounting,dc=airius,dc=com", + "objectclass" => ["top", "person", "organizationalPerson"], + "cn" => ["Bjorn Jensen"], + "sn" => ["Jensen"], + "telephonenumber" => ["+1 408 555 1212"], + } + assert_ldif(1, [entry1, entry2], ldif_source) + end + + def test_an_entry ldif_source = <<-EOL version: 1 dn: cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com From codesite-noreply at google.com Tue Nov 20 16:21:12 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Tue, 20 Nov 2007 13:21:12 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r511 - in trunk: lib/active_ldap test Message-ID: <00163600d873043f62d824a5d91d8477@google.com> Author: koutou Date: Tue Nov 20 04:50:57 2007 New Revision: 511 Modified: trunk/lib/active_ldap/ldif.rb trunk/test/test_ldif.rb Log: * supported attribute parsing. Modified: trunk/lib/active_ldap/ldif.rb ============================================================================== --- trunk/lib/active_ldap/ldif.rb (original) +++ trunk/lib/active_ldap/ldif.rb Tue Nov 20 04:50:57 2007 @@ -19,6 +19,10 @@ end SEPARATOR = /(?:\r\n|\n)/ + ATTRIBUTE_TYPE_CHARS = /[a-zA-Z][a-zA-Z0-9\-]*/ + SAFE_CHAR = /[\x01-\x09\x0B-\x0C\x0E-\x7F]/ + SAFE_INIT_CHAR = /[\x01-\x09\x0B-\x0C\x0E-\x1F\x21-\x39\x3B\x3D-\x7F]/ + SAFE_STRING = /#{SAFE_INIT_CHAR}#{SAFE_CHAR}*/ def parse return @ldif if @ldif @@ -42,7 +46,9 @@ raise separator_is_missing unless scanner.scan(SEPARATOR) - @ldif = LDIF.new(version, [Entry.new(dn)]) + attributes = parse_attributes(scanner) + + @ldif = LDIF.new(version, [Entry.new(dn, attributes)]) end private @@ -59,6 +65,50 @@ invalid_ldif(_("DN is invalid: %s: %s") % [dn_string, $!.reason]) end + def parse_attributes(scanner) + attributes = {} + type, options, value = parse_attribute(scanner) + attributes[type] = [value] + while scanner.scan(SEPARATOR) + break if scanner.scan(/#{SEPARATOR}+/) or scanner.eos? + type, options, value = parse_attribute(scanner) + attributes[type] ||= [] + attributes[type] << value + end + attributes + end + + def parse_attribute(scanner) + type = scanner.scan(ATTRIBUTE_TYPE_CHARS) + raise attribute_type_is_missing if type.nil? + options = parse_options(scanner) + value = parse_attribute_value(scanner) + [type, options, value] + end + + def parse_options(scanner) + options = [] + while scanner.scan(/;/) + option = scanner.scan(ATTRIBUTE_TYPE_CHARS) + raise option_is_missing if option.nil? + options << option + end + options + end + + def parse_attribute_value(scanner) + raise attribute_value_separator_is_missing if scanner.scan(/:/).nil? + if scanner.scan(/:/) + scanner.scan(/\s*/) + read_base64_value(scanner) + elsif scanner.scan(/ dn}) end end end Modified: trunk/test/test_ldif.rb ============================================================================== --- trunk/test/test_ldif.rb (original) +++ trunk/test/test_ldif.rb Tue Nov 20 04:50:57 2007 @@ -10,25 +10,53 @@ end priority :must + def test_attribute_value_spec + ldif_source = <<-EOL +version: 1 +dn: cn=Barbara Jensen, ou=Product Development, dc=airius, dc=com +objectclass: top +objectclass: person +objectclass: organizationalPerson +cn: Barbara Jensen +cn: Barbara J Jensen +cn: Babs Jensen +sn: Jensen +uid: bjensen +telephonenumber: +1 408 555 1212 +description: A big sailing fan. +EOL + entry = { + "dn" => "cn=Barbara Jensen,ou=Product Development,dc=airius,dc=com", + "objectclass" => ["top", "person", "organizationalPerson"], + "cn" => ["Barbara Jensen", "Barbara J Jensen", "Babs Jensen"], + "sn" => ["Jensen"], + "uid" => ["bjensen"], + "telephonenumber" => ["+1 408 555 1212"], + "description" => ["A big sailing fan."], + } + assert_ldif(1, [entry], ldif_source) + end + def test_dn_spec assert_invalid_ldif("'dn:' is missing", "version: 1\n") assert_invalid_ldif("DN is missing", "version: 1\ndn:") assert_invalid_ldif("DN is missing", "version: 1\ndn:\n") assert_invalid_ldif("DN is missing", "version: 1\ndn: \n") - assert_valid_dn("cn=Barbara Jensen,ou=Product Development,dc=example,dc=com", - "version: 1\n" + - "dn: cn=Barbara Jensen, ou=Product Development, " + - "dc=example, dc=com\n") dn = "cn=Barbara Jensen,ou=Product Development,dc=example,dc=com" + cn = "Barbara Jensen" + assert_valid_dn(dn, + "version: 1\ndn: #{dn}\ncn:#{cn}\n") + encoded_dn = Base64.encode64(dn).gsub(/\n/, "\n ") - assert_valid_dn(dn, "version: 1\ndn:: #{encoded_dn}\n") + encoded_cn = Base64.encode64(cn).gsub(/\n/, "\n ") + assert_valid_dn(dn, "version: 1\ndn:: #{encoded_dn}\ncn::#{encoded_cn}\n") end def test_version_number - assert_valid_version(1, "version: 1\ndn: dc=com\n") - assert_valid_version(1, "version: 1\r\ndn: dc=com\n") - assert_valid_version(1, "version: 1\r\n\n\r\n\ndn: dc=com\n") + assert_valid_version(1, "version: 1\ndn: dc=com\ndc: com") + assert_valid_version(1, "version: 1\r\ndn: dc=com\ndc: com\n") + assert_valid_version(1, "version: 1\r\n\n\r\n\ndn: dc=com\ndc: com\n") assert_invalid_ldif("unsupported version: 0", "version: 0") assert_invalid_ldif("unsupported version: 2", "version: 2") @@ -44,6 +72,13 @@ priority :normal private + def assert_ldif(version, entries, ldif_source) + ldif = ActiveLdap::Ldif.parse(ldif_source) + assert_equal(version, ldif.version) + assert_equal(entries, + ldif.entries.collect {|entry| entry.to_hash}) + end + def assert_valid_dn(dn, ldif_source) ldif = ActiveLdap::Ldif.parse(ldif_source) assert_equal([dn], ldif.entries.collect {|entry| entry.dn}) From codesite-noreply at google.com Tue Nov 20 16:25:21 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Tue, 20 Nov 2007 13:25:21 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r513 - trunk/test Message-ID: <00c09ffb5002043f62e6fdc7e01d74ae@google.com> Author: koutou Date: Tue Nov 20 05:13:53 2007 New Revision: 513 Modified: trunk/test/test_ldif.rb Log: * supported Base64 encoded value in attribute value. Modified: trunk/test/test_ldif.rb ============================================================================== --- trunk/test/test_ldif.rb (original) +++ trunk/test/test_ldif.rb Tue Nov 20 05:13:53 2007 @@ -10,6 +10,39 @@ end priority :must + def test_an_entry_with_base64_encoded_value + ldif_source = <<-EOL +version: 1 +dn: cn=Gern Jensen, ou=Product Testing, dc=airius, dc=com +objectclass: top +objectclass: person +objectclass: organizationalPerson +cn: Gern Jensen +cn: Gern O Jensen +sn: Jensen +uid: gernj +telephonenumber: +1 408 555 1212 +description:: V2hhdCBhIGNhcmVmdWwgcmVhZGVyIHlvdSBhcmUhICBUaGlzIHZhbHVl + IGlzIGJhc2UtNjQtZW5jb2RlZCBiZWNhdXNlIGl0IGhhcyBhIGNvbnRyb2wgY2hhcmFjdG + VyIGluIGl0IChhIENSKS4NICBCeSB0aGUgd2F5LCB5b3Ugc2hvdWxkIHJlYWxseSBnZXQg + b3V0IG1vcmUu +EOL + + entry = { + "dn" => "cn=Gern Jensen,ou=Product Testing,dc=airius,dc=com", + "objectclass" => ["top", "person", "organizationalPerson"], + "cn" => ["Gern Jensen", "Gern O Jensen"], + "sn" => ["Jensen"], + "uid" => ["gernj"], + "telephonenumber" => ["+1 408 555 1212"], + "description" => ["What a careful reader you are! " + + "This value is base-64-encoded because it has a " + + "control character in it (a CR).\r By the way, " + + "you should really get out more."], + } + assert_ldif(1, [entry], ldif_source) + end + def test_entries ldif_source = <<-EOL version: 1 @@ -68,6 +101,7 @@ telephonenumber: +1 408 555 1212 description: A big sailing fan. EOL + entry = { "dn" => "cn=Barbara Jensen,ou=Product Development,dc=airius,dc=com", "objectclass" => ["top", "person", "organizationalPerson"], From codesite-noreply at google.com Thu Nov 22 22:45:57 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Thu, 22 Nov 2007 19:45:57 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r514 - trunk/lib/active_ldap Message-ID: <00163600d873043f9073cb2c9628f225@google.com> Author: koutou Date: Thu Nov 22 19:45:34 2007 New Revision: 514 Modified: trunk/lib/active_ldap/object_class.rb Log: * improved format. Modified: trunk/lib/active_ldap/object_class.rb ============================================================================== --- trunk/lib/active_ldap/object_class.rb (original) +++ trunk/lib/active_ldap/object_class.rb Thu Nov 22 19:45:34 2007 @@ -50,7 +50,7 @@ unless invalid_classes.empty? format = _("Value in objectClass array is not a String: %s") invalid_classes_info = invalid_classes.collect do |invalid_class| - "#{invalid_class.class}:#{invalid_class.inspect}" + "#{invalid_class.class}: #{invalid_class.inspect}" end.join(", ") raise TypeError, format % invalid_classes_info end From codesite-noreply at google.com Thu Nov 22 22:51:58 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Thu, 22 Nov 2007 19:51:58 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r515 - trunk/lib/active_ldap Message-ID: <00c09ff7928c043f908959052028e3b1@google.com> Author: koutou Date: Thu Nov 22 19:51:21 2007 New Revision: 515 Modified: trunk/lib/active_ldap/object_class.rb Log: * accedpted nil as repace_class. Modified: trunk/lib/active_ldap/object_class.rb ============================================================================== --- trunk/lib/active_ldap/object_class.rb (original) +++ trunk/lib/active_ldap/object_class.rb Thu Nov 22 19:51:21 2007 @@ -13,7 +13,7 @@ end def add_class(*target_classes) - replace_class((classes + target_classes.flatten).uniq) + replace_class(classes + target_classes) end def ensure_recommended_classes @@ -21,11 +21,11 @@ end def remove_class(*target_classes) - replace_class((classes - target_classes.flatten).uniq) + replace_class(classes - target_classes) end def replace_class(*target_classes) - new_classes = target_classes.flatten.uniq + new_classes = target_classes.flatten.compact.uniq assert_object_classes(new_classes) if new_classes.sort != classes.sort set_attribute('objectClass', new_classes) From codesite-noreply at google.com Thu Nov 22 22:55:59 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Thu, 22 Nov 2007 19:55:59 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r516 - trunk/test Message-ID: <00c09ffb4bcf043f9097b3724f28ff34@google.com> Author: koutou Date: Thu Nov 22 19:53:42 2007 New Revision: 516 Modified: trunk/test/test_object_class.rb Log: * added a test for replace_class. Modified: trunk/test/test_object_class.rb ============================================================================== --- trunk/test/test_object_class.rb (original) +++ trunk/test/test_object_class.rb Thu Nov 22 19:53:42 2007 @@ -4,6 +4,13 @@ include AlTestUtils priority :must + def test_pass_nil_to_replace_class + make_temporary_group do |group| + assert_raises(ActiveLdap::RequiredObjectClassMissed) do + group.replace_class(nil) + end + end + end priority :normal def test_case_insensitive_match From codesite-noreply at google.com Thu Nov 22 23:50:08 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Thu, 22 Nov 2007 20:50:08 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r517 - in trunk/examples/al-admin: app/controllers app/helpers app/views/layouts app/views/users ... Message-ID: <00c09ffb4bcf043f9159547f13292add@google.com> Author: koutou Date: Thu Nov 22 20:49:06 2007 New Revision: 517 Removed: trunk/examples/al-admin/app/views/layouts/_flash_box.rhtml trunk/examples/al-admin/public/stylesheets/common.css Modified: trunk/examples/al-admin/app/controllers/users_controller.rb trunk/examples/al-admin/app/helpers/application_helper.rb trunk/examples/al-admin/app/views/layouts/application.rhtml trunk/examples/al-admin/app/views/users/_object_classes_update_form.rhtml trunk/examples/al-admin/public/stylesheets/base.css Log: * handled objectClass change error. Modified: trunk/examples/al-admin/app/controllers/users_controller.rb ============================================================================== --- trunk/examples/al-admin/app/controllers/users_controller.rb (original) +++ trunk/examples/al-admin/app/controllers/users_controller.rb Thu Nov 22 20:49:06 2007 @@ -34,7 +34,14 @@ def update_object_classes @user = find(params[:id]) - @user.replace_class(params["object-classes"]) + begin + @user.replace_class(params["object-classes"]) + rescue ActiveLdap::RequiredObjectClassMissed + flash.now[:inline_notice] = $!.message + erb = "<%= flash_box(flash[:inline_notice], :need_container => true) %>" + render(:inline => erb, :status => 400) + return + end available_attributes = @user.attribute_names(true) attributes = {} (params[:user] || {}).each do |key, value| Modified: trunk/examples/al-admin/app/helpers/application_helper.rb ============================================================================== --- trunk/examples/al-admin/app/helpers/application_helper.rb (original) +++ trunk/examples/al-admin/app/helpers/application_helper.rb Thu Nov 22 20:49:06 2007 @@ -2,12 +2,18 @@ module ApplicationHelper include UrlHelper - def flash_box(message) + def flash_box(message, options={}) + return '' if message.nil? id = "flash-box" fade_out = Proc.new {|page| page.visual_effect(:fade, id)} + message = content_tag(:p, h(message), :class => "notice") flash_box_div = content_tag("div", "\n#{message}\n", :id => id, :onclick => update_page(&fade_out)) + if options[:need_container] + flash_box_div = content_tag("div", "\n #{flash_box_div}\n", + :class => "flash-box-container") + end set_opacity = update_page {|page| page[id].setOpacity("0.8")} effect = update_page do |page| page.delay(5) do Modified: trunk/examples/al-admin/app/views/layouts/application.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/layouts/application.rhtml (original) +++ trunk/examples/al-admin/app/views/layouts/application.rhtml Thu Nov 22 20:49:06 2007 @@ -13,7 +13,8 @@ <%= stylesheet_link_tag('rails') %> <%= stylesheet_link_tag('spinelz/treeview.css') %> <%= stylesheet_link_tag('spinelz/switcher.css') %> - <%= stylesheet_link_tag('common') %> + <%= stylesheet_link_tag('base') %> + <%= stylesheet_link_tag('structure') %> <%= stylesheet_link_tag(@controller.controller_name.gsub(/_/, "-")) %> <%= javascript_include_tag(:defaults) %> <%= javascript_include_tag("spinelz_lib/spinelz_util.js") %> @@ -34,7 +35,7 @@
    - <%= render(:partial => "layouts/flash_box") %> + <%= flash_box(flash[:notice]) %>
    Modified: trunk/examples/al-admin/app/views/users/_object_classes_update_form.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/users/_object_classes_update_form.rhtml (original) +++ trunk/examples/al-admin/app/views/users/_object_classes_update_form.rhtml Thu Nov 22 20:49:06 2007 @@ -1,6 +1,7 @@ <% using_object_classes = @user.classes available_object_classes = @user.schema.object_classes.collect(&:name) + update_failure_id = 'object-classes-obdate-failur' %> <% switcher("object-classes", _("Update objectClasses")) do %> @@ -33,8 +34,13 @@ <% end %> <%= javascript_tag("function updateAttributesForm(form) {" + - remote_function(:update => attributes_form_id, + remote_function(:update => { + :success => attributes_form_id, + :failure => update_failure_id, + }, :url => {:action => :update_object_classes, :id => @user}, :with => 'Form.serialize(form)') + "}") %> + +
    Modified: trunk/examples/al-admin/public/stylesheets/base.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/base.css (original) +++ trunk/examples/al-admin/public/stylesheets/base.css Thu Nov 22 20:49:06 2007 @@ -34,6 +34,11 @@ background-color: #cfc; } +div.flash-box-container +{ + position: relative; +} + div#flash-box { position: absolute; From codesite-noreply at google.com Thu Nov 22 23:56:08 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Thu, 22 Nov 2007 20:56:08 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r518 - trunk/examples/al-admin/app/controllers Message-ID: <00163600d873043f916ecec9792927b7@google.com> Author: koutou Date: Thu Nov 22 20:56:01 2007 New Revision: 518 Modified: trunk/examples/al-admin/app/controllers/users_controller.rb Log: * handled invalid objectClass error. Modified: trunk/examples/al-admin/app/controllers/users_controller.rb ============================================================================== --- trunk/examples/al-admin/app/controllers/users_controller.rb (original) +++ trunk/examples/al-admin/app/controllers/users_controller.rb Thu Nov 22 20:56:01 2007 @@ -19,8 +19,14 @@ def update @user = find(params[:id]) previous_user_password = @user.user_password - @user.replace_class(params["object-classes"]) - if @user.update_attributes(params[:user]) + object_class_error_message = nil + begin + @user.replace_class(params["object-classes"]) + rescue ActiveLdap::RequiredObjectClassMissed + object_class_error_message = $!.message + end + if @user.update_attributes(params[:user]) and + object_class_error_message.nil? if previous_user_password != @user.user_password and @user.connected? @user.bind(@user.password) end @@ -28,6 +34,7 @@ redirect_to :action => 'show', :id => @user else @user.password = @user.password_confirmation = nil + @user.errors.add("objectClass", object_class_error_message) render :action => 'edit' end end From codesite-noreply at google.com Fri Nov 30 21:57:34 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Fri, 30 Nov 2007 18:57:34 -0800 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r519 - in trunk: lib/active_ldap test Message-ID: <00163600d873044030b584660a142827@google.com> Author: koutou Date: Fri Nov 30 18:56:43 2007 New Revision: 519 Modified: trunk/lib/active_ldap/attributes.rb trunk/lib/active_ldap/validations.rb trunk/test/test_validation.rb Log: * fixed Hash value's validation check. Modified: trunk/lib/active_ldap/attributes.rb ============================================================================== --- trunk/lib/active_ldap/attributes.rb (original) +++ trunk/lib/active_ldap/attributes.rb Fri Nov 30 18:56:43 2007 @@ -19,6 +19,17 @@ result + ancestor.instance_eval {@attr_protected ||= []} end end + + def blank_value?(value) + case value + when Hash + value.values.all? {|val| blank_value?(val)} + when Array + value.all? {|val| blank_value?(val)} + else + value.blank? + end + end end module Normalize Modified: trunk/lib/active_ldap/validations.rb ============================================================================== --- trunk/lib/active_ldap/validations.rb (original) +++ trunk/lib/active_ldap/validations.rb Fri Nov 30 18:56:43 2007 @@ -83,6 +83,7 @@ # Basic validation: # - Verify that every 'MUST' specified in the schema has a value defined def validate_required_ldap_values + _schema = nil # Make sure all MUST attributes have a value @object_classes.each do |object_class| object_class.must.each do |required_attribute| @@ -90,35 +91,33 @@ # needed? real_name = to_real_attribute_name(required_attribute.name, true) raise UnknownAttribute.new(required_attribute) if real_name.nil? - # # Set default if it wasn't yet set. - # @data[real_name] ||= [] # need? + value = @data[real_name] || [] - # Check for missing requirements. - if value.empty? - _schema = schema - aliases = required_attribute.aliases.collect do |name| - self.class.human_attribute_name(name) + next unless self.class.blank_value?(value) + + _schema ||= schema + aliases = required_attribute.aliases.collect do |name| + self.class.human_attribute_name(name) + end + args = [self.class.human_object_class_name(object_class)] + if ActiveLdap.get_text_supported? + if aliases.empty? + format = _("%{fn} is required attribute by objectClass '%s'") + else + format = _("%{fn} is required attribute by objectClass " \ + "'%s': aliases: %s") + args << aliases.join(', ') end - args = [self.class.human_object_class_name(object_class)] - if ActiveLdap.get_text_supported? - if aliases.empty? - format = _("%{fn} is required attribute by objectClass '%s'") - else - format = _("%{fn} is required attribute by objectClass " \ - "'%s': aliases: %s") - args << aliases.join(', ') - end + else + if aliases.empty? + format = "is required attribute by objectClass '%s'" else - if aliases.empty? - format = "is required attribute by objectClass '%s'" - else - format = "is required attribute by objectClass '%s'" \ - ": aliases: %s" - args << aliases.join(', ') - end + format = "is required attribute by objectClass '%s'" \ + ": aliases: %s" + args << aliases.join(', ') end - errors.add(real_name, format % args) end + errors.add(real_name, format % args) end end end Modified: trunk/test/test_validation.rb ============================================================================== --- trunk/test/test_validation.rb (original) +++ trunk/test/test_validation.rb Fri Nov 30 18:56:43 2007 @@ -5,6 +5,19 @@ include ActiveLdap::Helper priority :must + def test_validate_required_ldap_values + make_temporary_user(:simple => true) do |user, password| + assert(user.save) + + user.add_class("strongAuthenticationUser") + user.user_certificate = nil + assert(!user.save) + assert(user.errors.invalid?(:userCertificate)) + assert_equal(1, user.errors.size) + end + end + + priority :normal def test_syntax_validation make_temporary_user do |user, password| assert(user.save) @@ -26,7 +39,6 @@ "lang-ja-jp") end - priority :normal def test_duplicated_dn_creation assert(ou_class.new("YYY").save) ou = ou_class.new("YYY")
    Modified: trunk/examples/al-admin/public/stylesheets/users.css ============================================================================== --- trunk/examples/al-admin/public/stylesheets/users.css (original) +++ trunk/examples/al-admin/public/stylesheets/users.css Sat Nov 3 23:53:08 2007 @@ -1,6 +1,6 @@ @import url("detail.css"); -form > table +table.form { margin: 1em; } From codesite-noreply at google.com Sun Nov 4 01:57:43 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Sat, 03 Nov 2007 23:57:43 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r497 - trunk Message-ID: <00163600d873043e14ea9d9ceb817c01@google.com> Author: koutou Date: Sat Nov 3 23:57:31 2007 New Revision: 497 Modified: trunk/CHANGES Log: * updated CHANGES. Modified: trunk/CHANGES ============================================================================== --- trunk/CHANGES (original) +++ trunk/CHANGES Sat Nov 3 23:57:31 2007 @@ -16,6 +16,7 @@ * Supported lang parameter in URL. * Improved design a bit. (Please someone help us!) * Supported schema inspection. + * Supported objectClass modifiation. * Rails plugin: * Added ActiveLdap::VERSION check. * Added model_active_ldap generator. From codesite-noreply at google.com Sun Nov 4 02:01:44 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Sun, 04 Nov 2007 00:01:44 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r498 - in trunk/examples/al-admin/po: en ja nl Message-ID: <00163600d1b5043e14f8f9da6581e186@google.com> Author: koutou Date: Sat Nov 3 23:58:10 2007 New Revision: 498 Modified: trunk/examples/al-admin/po/en/al-admin.po trunk/examples/al-admin/po/ja/al-admin.po trunk/examples/al-admin/po/nl/al-admin.po Log: * updated messages. Modified: trunk/examples/al-admin/po/en/al-admin.po ============================================================================== --- trunk/examples/al-admin/po/en/al-admin.po (original) +++ trunk/examples/al-admin/po/en/al-admin.po Sat Nov 3 23:58:10 2007 @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: AL Admin 0.8.4\n" -"POT-Creation-Date: 2007-11-03 22:35+0900\n" +"POT-Creation-Date: 2007-11-04 15:53+0900\n" "PO-Revision-Date: 2007-08-19 09:44+0900\n" "Last-Translator: Kouhei Sutou \n" "Language-Team: English\n" @@ -67,7 +67,7 @@ msgid "Populating is only for initialization" msgstr "" -#: app/controllers/account_controller.rb:24 lib/authenticated_system.rb:123 +#: app/controllers/account_controller.rb:24 lib/authenticated_system.rb:112 msgid "Logged in successfully" msgstr "" @@ -83,7 +83,7 @@ msgid "You have been logged out." msgstr "" -#: app/controllers/users_controller.rb:26 +#: app/controllers/users_controller.rb:27 msgid "User was successfully updated." msgstr "" @@ -100,7 +100,7 @@ msgstr "" #: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:37 -#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9 +#: app/views/users/edit.rhtml:13 app/views/users/show.rhtml:9 #: app/views/syntaxes/show.rhtml:20 app/views/attributes/show.rhtml:29 msgid "Menu|Index" msgstr "" @@ -149,6 +149,7 @@ #: app/views/_entry/_attributes_information.rhtml:8 #: app/views/object_classes/show.rhtml:6 #: app/views/object_classes/_attributes.rhtml:11 +#: app/views/users/_object_classes_update_form.rhtml:12 #: app/views/syntaxes/_syntaxes.rhtml:6 app/views/syntaxes/show.rhtml:6 #: app/views/attributes/show.rhtml:6 app/views/attributes/_attributes.rhtml:6 msgid "Description" @@ -163,6 +164,7 @@ msgstr "" #: app/views/object_classes/_object_classes.rhtml:5 +#: app/views/users/_object_classes_update_form.rhtml:11 msgid "objectClass name" msgstr "" @@ -200,12 +202,12 @@ msgid "Inherited" msgstr "" -#: app/views/users/edit.rhtml:7 -msgid "Command|Update" +#: app/views/users/edit.rhtml:12 +msgid "Menu|Show" msgstr "" -#: app/views/users/edit.rhtml:13 -msgid "Menu|Show" +#: app/views/users/_form.rhtml:5 app/views/users/_form.rhtml:13 +msgid "Command|Update" msgstr "" #: app/views/users/_password_change_form.rhtml:2 @@ -222,6 +224,14 @@ msgid "Confirm Password" msgstr "" +#: app/views/users/_object_classes_update_form.rhtml:6 +msgid "Update objectClasses" +msgstr "" + +#: app/views/users/_object_classes_update_form.rhtml:10 +msgid "Use" +msgstr "" + #: app/views/users/index.rhtml:2 msgid "No user." msgstr "" @@ -294,7 +304,7 @@ msgid "Welcome %s!" msgstr "" -#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:79 +#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:68 msgid "Please login." msgstr "" Modified: trunk/examples/al-admin/po/ja/al-admin.po ============================================================================== --- trunk/examples/al-admin/po/ja/al-admin.po (original) +++ trunk/examples/al-admin/po/ja/al-admin.po Sat Nov 3 23:58:10 2007 @@ -6,8 +6,8 @@ msgid "" msgstr "" "Project-Id-Version: AL Admin 0.8.4\n" -"POT-Creation-Date: 2007-11-03 22:35+0900\n" -"PO-Revision-Date: 2007-11-03 22:36+0900\n" +"POT-Creation-Date: 2007-11-04 15:53+0900\n" +"PO-Revision-Date: 2007-11-04 15:54+0900\n" "Last-Translator: Kouhei Sutou \n" "Language-Team: Japanese\n" "MIME-Version: 1.0\n" @@ -67,7 +67,7 @@ msgid "Populating is only for initialization" msgstr "$B%G!<%?9=C[$O=i4|2=;~$N$_MxMQ$G$-$^$9!#(B" -#: app/controllers/account_controller.rb:24 lib/authenticated_system.rb:123 +#: app/controllers/account_controller.rb:24 lib/authenticated_system.rb:112 msgid "Logged in successfully" msgstr "$B%m%0%$%s$K at .8y$7$^$7$?!#(B" @@ -83,7 +83,7 @@ msgid "You have been logged out." msgstr "$B%m%0%"%&%H$7$^$7$?!#(B" -#: app/controllers/users_controller.rb:26 +#: app/controllers/users_controller.rb:27 msgid "User was successfully updated." msgstr "$B%f!<%6$r at 5>o$K99?7$7$^$7$?!#(B" @@ -100,7 +100,7 @@ msgstr "$B40N;!#(B" #: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:37 -#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9 +#: app/views/users/edit.rhtml:13 app/views/users/show.rhtml:9 #: app/views/syntaxes/show.rhtml:20 app/views/attributes/show.rhtml:29 msgid "Menu|Index" msgstr "$B0lMw(B" @@ -149,6 +149,7 @@ #: app/views/_entry/_attributes_information.rhtml:8 #: app/views/object_classes/show.rhtml:6 #: app/views/object_classes/_attributes.rhtml:11 +#: app/views/users/_object_classes_update_form.rhtml:12 #: app/views/syntaxes/_syntaxes.rhtml:6 app/views/syntaxes/show.rhtml:6 #: app/views/attributes/show.rhtml:6 app/views/attributes/_attributes.rhtml:6 msgid "Description" @@ -163,6 +164,7 @@ msgstr "$BB0 at -0lMw(B" #: app/views/object_classes/_object_classes.rhtml:5 +#: app/views/users/_object_classes_update_form.rhtml:11 msgid "objectClass name" msgstr "$B%*%V%8%'%/%H%/%i%9L>(B" @@ -200,14 +202,14 @@ msgid "Inherited" msgstr "$B7Q>5(B" -#: app/views/users/edit.rhtml:7 -msgid "Command|Update" -msgstr "$B99?7(B" - -#: app/views/users/edit.rhtml:13 +#: app/views/users/edit.rhtml:12 msgid "Menu|Show" msgstr "$BI=<((B" +#: app/views/users/_form.rhtml:5 app/views/users/_form.rhtml:13 +msgid "Command|Update" +msgstr "$B99?7(B" + #: app/views/users/_password_change_form.rhtml:2 msgid "Change password" msgstr "$B%Q%9%o!<%IJQ99(B" @@ -222,6 +224,14 @@ msgid "Confirm Password" msgstr "$B3NG'MQ%Q%9%o!<%I(B" +#: app/views/users/_object_classes_update_form.rhtml:6 +msgid "Update objectClasses" +msgstr "$B%*%V%8%'%/%H%/%i%999?7(B" + +#: app/views/users/_object_classes_update_form.rhtml:10 +msgid "Use" +msgstr "$B;H$&(B" + #: app/views/users/index.rhtml:2 msgid "No user." msgstr "$B%f!<%6$,$$$^$;$s!#(B" @@ -294,7 +304,7 @@ msgid "Welcome %s!" msgstr "$B$h$&$3$=(B%s$B!*(B" -#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:79 +#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:68 msgid "Please login." msgstr "$B%m%0%$%s$7$F$/$@$5$$!#(B" Modified: trunk/examples/al-admin/po/nl/al-admin.po ============================================================================== --- trunk/examples/al-admin/po/nl/al-admin.po (original) +++ trunk/examples/al-admin/po/nl/al-admin.po Sat Nov 3 23:58:10 2007 @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: AL Admin 0.8.4\n" -"POT-Creation-Date: 2007-11-03 22:35+0900\n" +"POT-Creation-Date: 2007-11-04 15:53+0900\n" "PO-Revision-Date: 2007-08-24 22:03+0900\n" "Last-Translator: Ace Suares \n" "Language-Team: Nederlands \n" @@ -70,7 +70,7 @@ msgid "Populating is only for initialization" msgstr "" -#: app/controllers/account_controller.rb:24 lib/authenticated_system.rb:123 +#: app/controllers/account_controller.rb:24 lib/authenticated_system.rb:112 msgid "Logged in successfully" msgstr "Succesvol aangemeld" @@ -86,7 +86,7 @@ msgid "You have been logged out." msgstr "U bent afgemeld." -#: app/controllers/users_controller.rb:26 +#: app/controllers/users_controller.rb:27 msgid "User was successfully updated." msgstr "Gebruikersgegevens bijgewerkt." @@ -103,7 +103,7 @@ msgstr "" #: app/views/directory/populate.rhtml:2 app/views/object_classes/show.rhtml:37 -#: app/views/users/edit.rhtml:14 app/views/users/show.rhtml:9 +#: app/views/users/edit.rhtml:13 app/views/users/show.rhtml:9 #: app/views/syntaxes/show.rhtml:20 app/views/attributes/show.rhtml:29 #, fuzzy msgid "Menu|Index" @@ -158,6 +158,7 @@ #: app/views/_entry/_attributes_information.rhtml:8 #: app/views/object_classes/show.rhtml:6 #: app/views/object_classes/_attributes.rhtml:11 +#: app/views/users/_object_classes_update_form.rhtml:12 #: app/views/syntaxes/_syntaxes.rhtml:6 app/views/syntaxes/show.rhtml:6 #: app/views/attributes/show.rhtml:6 app/views/attributes/_attributes.rhtml:6 #, fuzzy @@ -174,6 +175,7 @@ msgstr "naam van het attribuut" #: app/views/object_classes/_object_classes.rhtml:5 +#: app/views/users/_object_classes_update_form.rhtml:11 msgid "objectClass name" msgstr "" @@ -213,14 +215,14 @@ msgid "Inherited" msgstr "" -#: app/views/users/edit.rhtml:7 -msgid "Command|Update" -msgstr "" - -#: app/views/users/edit.rhtml:13 +#: app/views/users/edit.rhtml:12 msgid "Menu|Show" msgstr "Toon" +#: app/views/users/_form.rhtml:5 app/views/users/_form.rhtml:13 +msgid "Command|Update" +msgstr "" + #: app/views/users/_password_change_form.rhtml:2 #, fuzzy msgid "Change password" @@ -236,6 +238,16 @@ msgid "Confirm Password" msgstr "Bevestig Wachtwoord" +#: app/views/users/_object_classes_update_form.rhtml:6 +#, fuzzy +msgid "Update objectClasses" +msgstr "Gebruikerslijst" + +#: app/views/users/_object_classes_update_form.rhtml:10 +#, fuzzy +msgid "Use" +msgstr "DN" + #: app/views/users/index.rhtml:2 msgid "No user." msgstr "Geen gebruiker" @@ -312,7 +324,7 @@ msgid "Welcome %s!" msgstr "" -#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:79 +#: app/views/welcome/index.rhtml:12 lib/authenticated_system.rb:68 msgid "Please login." msgstr "" From codesite-noreply at google.com Sun Nov 4 02:05:44 2007 From: codesite-noreply at google.com (codesite-noreply at google.com) Date: Sun, 04 Nov 2007 00:05:44 -0700 Subject: [Ruby-activeldap-commit] [ruby-activeldap commit] r499 - trunk/examples/al-admin/app/views/object_classes Message-ID: <00163600d2c5043e15074a760381ea94@google.com> Author: koutou Date: Sun Nov 4 00:02:03 2007 New Revision: 499 Modified: trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml Log: * fixed inverted condition bug. Modified: trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml ============================================================================== --- trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml (original) +++ trunk/examples/al-admin/app/views/object_classes/_attributes.rhtml Sun Nov 4 00:02:03 2007 @@ -17,7 +17,7 @@
    <%= link_to_attribute(attribute) %> - <%= boolean_value(own_attributes.include?(attribute)) %> + <%= boolean_value(!own_attributes.include?(attribute)) %> <%= h(lad_(attribute)) %>