activeldap 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGES +454 -0
- data/COPYING +340 -0
- data/LICENSE +58 -0
- data/README +101 -0
- data/Rakefile +175 -0
- data/TODO +25 -0
- data/benchmark/bench-al.rb +202 -0
- data/benchmark/config.yaml.sample +5 -0
- data/data/locale/en/LC_MESSAGES/active-ldap.mo +0 -0
- data/data/locale/ja/LC_MESSAGES/active-ldap.mo +0 -0
- data/examples/al-admin/README +182 -0
- data/examples/al-admin/Rakefile +10 -0
- data/examples/al-admin/app/controllers/account_controller.rb +59 -0
- data/examples/al-admin/app/controllers/application.rb +34 -0
- data/examples/al-admin/app/controllers/attributes_controller.rb +17 -0
- data/examples/al-admin/app/controllers/directory_controller.rb +47 -0
- data/examples/al-admin/app/controllers/object_classes_controller.rb +17 -0
- data/examples/al-admin/app/controllers/syntaxes_controller.rb +17 -0
- data/examples/al-admin/app/controllers/users_controller.rb +51 -0
- data/examples/al-admin/app/controllers/welcome_controller.rb +10 -0
- data/examples/al-admin/app/helpers/account_helper.rb +2 -0
- data/examples/al-admin/app/helpers/application_helper.rb +42 -0
- data/examples/al-admin/app/helpers/attributes_helper.rb +15 -0
- data/examples/al-admin/app/helpers/directory_helper.rb +7 -0
- data/examples/al-admin/app/helpers/object_classes_helper.rb +10 -0
- data/examples/al-admin/app/helpers/syntaxes_helper.rb +10 -0
- data/examples/al-admin/app/helpers/url_helper.rb +13 -0
- data/examples/al-admin/app/helpers/users_helper.rb +17 -0
- data/examples/al-admin/app/helpers/welcome_helper.rb +2 -0
- data/examples/al-admin/app/models/entry.rb +23 -0
- data/examples/al-admin/app/models/ldap_user.rb +54 -0
- data/examples/al-admin/app/models/user.rb +91 -0
- data/examples/al-admin/app/views/_entry/_attributes_information.rhtml +23 -0
- data/examples/al-admin/app/views/_entry/_entry.rhtml +15 -0
- data/examples/al-admin/app/views/_schema/_aliases.rhtml +7 -0
- data/examples/al-admin/app/views/_switcher/_after.rhtml +2 -0
- data/examples/al-admin/app/views/_switcher/_before.rhtml +5 -0
- data/examples/al-admin/app/views/account/login.rhtml +26 -0
- data/examples/al-admin/app/views/account/sign_up.rhtml +28 -0
- data/examples/al-admin/app/views/attributes/_attributes.rhtml +19 -0
- data/examples/al-admin/app/views/attributes/_detail.rhtml +29 -0
- data/examples/al-admin/app/views/attributes/index.rhtml +3 -0
- data/examples/al-admin/app/views/attributes/show.rhtml +31 -0
- data/examples/al-admin/app/views/directory/_tree.rhtml +10 -0
- data/examples/al-admin/app/views/directory/_tree_view_js.rhtml +26 -0
- data/examples/al-admin/app/views/directory/index.rhtml +13 -0
- data/examples/al-admin/app/views/directory/populate.rhtml +2 -0
- data/examples/al-admin/app/views/layouts/_flash_box.rhtml +4 -0
- data/examples/al-admin/app/views/layouts/_footer.rhtml +9 -0
- data/examples/al-admin/app/views/layouts/_header_menu.rhtml +10 -0
- data/examples/al-admin/app/views/layouts/_main_menu.rhtml +18 -0
- data/examples/al-admin/app/views/layouts/application.rhtml +56 -0
- data/examples/al-admin/app/views/object_classes/_attributes.rhtml +28 -0
- data/examples/al-admin/app/views/object_classes/_object_classes.rhtml +19 -0
- data/examples/al-admin/app/views/object_classes/index.rhtml +3 -0
- data/examples/al-admin/app/views/object_classes/show.rhtml +39 -0
- data/examples/al-admin/app/views/syntaxes/_detail.rhtml +14 -0
- data/examples/al-admin/app/views/syntaxes/_syntaxes.rhtml +19 -0
- data/examples/al-admin/app/views/syntaxes/index.rhtml +3 -0
- data/examples/al-admin/app/views/syntaxes/show.rhtml +22 -0
- data/examples/al-admin/app/views/users/_attributes_update_form.rhtml +30 -0
- data/examples/al-admin/app/views/users/_form.rhtml +13 -0
- data/examples/al-admin/app/views/users/_object_classes_update_form.rhtml +40 -0
- data/examples/al-admin/app/views/users/_password_change_form.rhtml +20 -0
- data/examples/al-admin/app/views/users/edit.rhtml +15 -0
- data/examples/al-admin/app/views/users/index.rhtml +10 -0
- data/examples/al-admin/app/views/users/show.rhtml +11 -0
- data/examples/al-admin/app/views/welcome/index.rhtml +13 -0
- data/examples/al-admin/config/boot.rb +45 -0
- data/examples/al-admin/config/database.yml.example +19 -0
- data/examples/al-admin/config/environment.rb +70 -0
- data/examples/al-admin/config/environments/development.rb +21 -0
- data/examples/al-admin/config/environments/production.rb +18 -0
- data/examples/al-admin/config/environments/test.rb +19 -0
- data/examples/al-admin/config/ldap.yml.example +21 -0
- data/examples/al-admin/config/routes.rb +46 -0
- data/examples/al-admin/db/migrate/001_create_users.rb +16 -0
- data/examples/al-admin/lib/accept_http_rails_relative_url_root.rb +9 -0
- data/examples/al-admin/lib/authenticated_system.rb +124 -0
- data/examples/al-admin/lib/authenticated_test_helper.rb +113 -0
- data/examples/al-admin/lib/tasks/gettext.rake +35 -0
- data/examples/al-admin/po/en/al-admin.po +341 -0
- data/examples/al-admin/po/ja/al-admin.po +341 -0
- data/examples/al-admin/po/nl/al-admin.po +373 -0
- data/examples/al-admin/public/.htaccess +40 -0
- data/examples/al-admin/public/404.html +30 -0
- data/examples/al-admin/public/500.html +30 -0
- data/examples/al-admin/public/dispatch.cgi +10 -0
- data/examples/al-admin/public/dispatch.fcgi +24 -0
- data/examples/al-admin/public/dispatch.rb +10 -0
- data/examples/al-admin/public/favicon.ico +0 -0
- data/examples/al-admin/public/images/active-ldap.svg +6351 -0
- data/examples/al-admin/public/images/al-admin.png +0 -0
- data/examples/al-admin/public/images/al-admin.svg +6371 -0
- data/examples/al-admin/public/images/header-background.png +0 -0
- data/examples/al-admin/public/images/header-background.svg +99 -0
- data/examples/al-admin/public/images/rails.png +0 -0
- data/examples/al-admin/public/images/spinelz/accordion_tab_left_active.gif +0 -0
- data/examples/al-admin/public/images/spinelz/accordion_tab_left_inactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/accordion_tab_middle_active.gif +0 -0
- data/examples/al-admin/public/images/spinelz/accordion_tab_middle_inactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/accordion_tab_right_active.gif +0 -0
- data/examples/al-admin/public/images/spinelz/accordion_tab_right_inactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_bottom_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_bottom_middle.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_bottom_right.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_left_down_arrow.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_left_up_arrow.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_middle_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_middle_right.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_right_down_arrow.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_right_up_arrow.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_top_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_top_middle.gif +0 -0
- data/examples/al-admin/public/images/spinelz/balloon_top_right.gif +0 -0
- data/examples/al-admin/public/images/spinelz/barchart_h.gif +0 -0
- data/examples/al-admin/public/images/spinelz/barchart_v.gif +0 -0
- data/examples/al-admin/public/images/spinelz/button.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_default_handler.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_delete.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_next.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_next_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_pre.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_pre_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_private_icon.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calendar_schedule.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calender_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/calender_back_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker2_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker2_back_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker2_next.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker2_next_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker2_pre.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker2_pre_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker_back_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker_next.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker_next_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker_pre.gif +0 -0
- data/examples/al-admin/public/images/spinelz/datepicker_pre_second.gif +0 -0
- data/examples/al-admin/public/images/spinelz/grid_down.gif +0 -0
- data/examples/al-admin/public/images/spinelz/grid_state.gif +0 -0
- data/examples/al-admin/public/images/spinelz/grid_up.gif +0 -0
- data/examples/al-admin/public/images/spinelz/icon_day.gif +0 -0
- data/examples/al-admin/public/images/spinelz/icon_month.gif +0 -0
- data/examples/al-admin/public/images/spinelz/icon_week.gif +0 -0
- data/examples/al-admin/public/images/spinelz/menubar_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/menubar_subcontents_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/navPanel_tab_left_active.gif +0 -0
- data/examples/al-admin/public/images/spinelz/navPanel_tab_left_inactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/navPanel_tab_middle_active.gif +0 -0
- data/examples/al-admin/public/images/spinelz/navPanel_tab_middle_inactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/navPanel_tab_right_active.gif +0 -0
- data/examples/al-admin/public/images/spinelz/navPanel_tab_right_inactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/select_date.gif +0 -0
- data/examples/al-admin/public/images/spinelz/selectabletable_selected.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_about.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_menu.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_sample.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabBottomActive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabBottomInactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabMiddleActive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabMiddleActive2.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabMiddleInactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabMiddleInactive2.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabTopActive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabTopInactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sideBarBox_tabbar.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sortableTable_down.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sortableTable_normal.gif +0 -0
- data/examples/al-admin/public/images/spinelz/sortableTable_up.gif +0 -0
- data/examples/al-admin/public/images/spinelz/switcher_close.gif +0 -0
- data/examples/al-admin/public/images/spinelz/switcher_open.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_close.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_tabLeftActive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_tabLeftInactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_tabMiddleActive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_tabMiddleInactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_tabRightActive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tabBox_tabRightInactive.gif +0 -0
- data/examples/al-admin/public/images/spinelz/tab_bar.gif +0 -0
- data/examples/al-admin/public/images/spinelz/table_back.gif +0 -0
- data/examples/al-admin/public/images/spinelz/timepicker_clock.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_close.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_max.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_middle.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_min.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_next.gif +0 -0
- data/examples/al-admin/public/images/spinelz/toolbar_right.gif +0 -0
- data/examples/al-admin/public/images/spinelz/treeview_dir.gif +0 -0
- data/examples/al-admin/public/images/spinelz/treeview_file.gif +0 -0
- data/examples/al-admin/public/images/spinelz/treeview_group.gif +0 -0
- data/examples/al-admin/public/images/spinelz/treeview_group_special.gif +0 -0
- data/examples/al-admin/public/images/spinelz/treeview_state.gif +0 -0
- data/examples/al-admin/public/images/spinelz/treeview_user.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_bottom_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_bottom_middle.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_bottom_right.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_close.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_max.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_middle_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_middle_right.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_min.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_top_left.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_top_middle.gif +0 -0
- data/examples/al-admin/public/images/spinelz/window_top_right.gif +0 -0
- data/examples/al-admin/public/javascripts/application.js +2 -0
- data/examples/al-admin/public/javascripts/controls.js +833 -0
- data/examples/al-admin/public/javascripts/dragdrop.js +942 -0
- data/examples/al-admin/public/javascripts/effects.js +1088 -0
- data/examples/al-admin/public/javascripts/prototype.js +2515 -0
- data/examples/al-admin/public/javascripts/spinelz/accordion.js +185 -0
- data/examples/al-admin/public/javascripts/spinelz/ajaxHistory.js +157 -0
- data/examples/al-admin/public/javascripts/spinelz/balloon.js +287 -0
- data/examples/al-admin/public/javascripts/spinelz/barchart.js +524 -0
- data/examples/al-admin/public/javascripts/spinelz/calendar.js +3012 -0
- data/examples/al-admin/public/javascripts/spinelz/colorpicker.js +128 -0
- data/examples/al-admin/public/javascripts/spinelz/datepicker.js +438 -0
- data/examples/al-admin/public/javascripts/spinelz/grid.js +1391 -0
- data/examples/al-admin/public/javascripts/spinelz/grid_resizeEx.js +100 -0
- data/examples/al-admin/public/javascripts/spinelz/grid_sortabletableEx.js +129 -0
- data/examples/al-admin/public/javascripts/spinelz/inplaceEditorEx.js +148 -0
- data/examples/al-admin/public/javascripts/spinelz/menubar.js +232 -0
- data/examples/al-admin/public/javascripts/spinelz/navPanel.js +170 -0
- data/examples/al-admin/public/javascripts/spinelz/selectableTable.js +433 -0
- data/examples/al-admin/public/javascripts/spinelz/sideBarBox.js +282 -0
- data/examples/al-admin/public/javascripts/spinelz/sideBarBox_effects.js +83 -0
- data/examples/al-admin/public/javascripts/spinelz/sortableTable.js +270 -0
- data/examples/al-admin/public/javascripts/spinelz/switcher.js +78 -0
- data/examples/al-admin/public/javascripts/spinelz/tabBox.js +469 -0
- data/examples/al-admin/public/javascripts/spinelz/timepicker.js +384 -0
- data/examples/al-admin/public/javascripts/spinelz/toolbar.js +152 -0
- data/examples/al-admin/public/javascripts/spinelz/treeview.js +703 -0
- data/examples/al-admin/public/javascripts/spinelz/window.js +641 -0
- data/examples/al-admin/public/javascripts/spinelz/window_resizeEx.js +130 -0
- data/examples/al-admin/public/javascripts/spinelz_lib/builder.js +131 -0
- data/examples/al-admin/public/javascripts/spinelz_lib/controls.js +835 -0
- data/examples/al-admin/public/javascripts/spinelz_lib/dragdrop.js +944 -0
- data/examples/al-admin/public/javascripts/spinelz_lib/effects.js +1090 -0
- data/examples/al-admin/public/javascripts/spinelz_lib/json.js +139 -0
- data/examples/al-admin/public/javascripts/spinelz_lib/prototype.js +2515 -0
- data/examples/al-admin/public/javascripts/spinelz_lib/resize.js +215 -0
- data/examples/al-admin/public/javascripts/spinelz_lib/scriptaculous.js +51 -0
- data/examples/al-admin/public/javascripts/spinelz_lib/slider.js +278 -0
- data/examples/al-admin/public/javascripts/spinelz_lib/spinelz_util.js +1266 -0
- data/examples/al-admin/public/javascripts/spinelz_lib/unittest.js +564 -0
- data/examples/al-admin/public/robots.txt +1 -0
- data/examples/al-admin/public/stylesheets/account.css +41 -0
- data/examples/al-admin/public/stylesheets/attributes.css +1 -0
- data/examples/al-admin/public/stylesheets/base.css +99 -0
- data/examples/al-admin/public/stylesheets/common.css +2 -0
- data/examples/al-admin/public/stylesheets/detail.css +36 -0
- data/examples/al-admin/public/stylesheets/directory.css +22 -0
- data/examples/al-admin/public/stylesheets/object-classes.css +6 -0
- data/examples/al-admin/public/stylesheets/rails.css +35 -0
- data/examples/al-admin/public/stylesheets/spinelz/accordion.css +59 -0
- data/examples/al-admin/public/stylesheets/spinelz/balloon.css +151 -0
- data/examples/al-admin/public/stylesheets/spinelz/calendar.css +564 -0
- data/examples/al-admin/public/stylesheets/spinelz/datepicker.css +175 -0
- data/examples/al-admin/public/stylesheets/spinelz/grid.css +137 -0
- data/examples/al-admin/public/stylesheets/spinelz/menubar.css +78 -0
- data/examples/al-admin/public/stylesheets/spinelz/modal.css +22 -0
- data/examples/al-admin/public/stylesheets/spinelz/navPanel.css +58 -0
- data/examples/al-admin/public/stylesheets/spinelz/selectableTable.css +28 -0
- data/examples/al-admin/public/stylesheets/spinelz/sideBarBox.css +82 -0
- data/examples/al-admin/public/stylesheets/spinelz/sortableTable.css +51 -0
- data/examples/al-admin/public/stylesheets/spinelz/switcher.css +23 -0
- data/examples/al-admin/public/stylesheets/spinelz/tabBox.css +94 -0
- data/examples/al-admin/public/stylesheets/spinelz/timepicker.css +508 -0
- data/examples/al-admin/public/stylesheets/spinelz/toolbar.css +82 -0
- data/examples/al-admin/public/stylesheets/spinelz/treeview.css +121 -0
- data/examples/al-admin/public/stylesheets/spinelz/window.css +140 -0
- data/examples/al-admin/public/stylesheets/structure.css +81 -0
- data/examples/al-admin/public/stylesheets/syntaxes.css +1 -0
- data/examples/al-admin/public/stylesheets/users.css +13 -0
- data/examples/al-admin/public/stylesheets/welcome.css +0 -0
- data/examples/al-admin/script/about +3 -0
- data/examples/al-admin/script/breakpointer +3 -0
- data/examples/al-admin/script/console +3 -0
- data/examples/al-admin/script/destroy +3 -0
- data/examples/al-admin/script/generate +3 -0
- data/examples/al-admin/script/performance/benchmarker +3 -0
- data/examples/al-admin/script/performance/profiler +3 -0
- data/examples/al-admin/script/plugin +3 -0
- data/examples/al-admin/script/process/inspector +3 -0
- data/examples/al-admin/script/process/reaper +3 -0
- data/examples/al-admin/script/process/spawner +3 -0
- data/examples/al-admin/script/runner +3 -0
- data/examples/al-admin/script/server +3 -0
- data/examples/al-admin/test/fixtures/users.yml +9 -0
- data/examples/al-admin/test/functional/account_controller_test.rb +24 -0
- data/examples/al-admin/test/functional/attributes_controller_test.rb +18 -0
- data/examples/al-admin/test/functional/directory_controller_test.rb +18 -0
- data/examples/al-admin/test/functional/object_classes_controller_test.rb +18 -0
- data/examples/al-admin/test/functional/syntaxes_controller_test.rb +18 -0
- data/examples/al-admin/test/functional/users_controller_test.rb +18 -0
- data/examples/al-admin/test/functional/welcome_controller_test.rb +18 -0
- data/examples/al-admin/test/run-test.sh +3 -0
- data/examples/al-admin/test/test_helper.rb +28 -0
- data/examples/al-admin/test/unit/user_test.rb +13 -0
- data/examples/al-admin/vendor/plugins/exception_notification/README +111 -0
- data/examples/al-admin/vendor/plugins/exception_notification/init.rb +1 -0
- data/examples/al-admin/vendor/plugins/exception_notification/lib/exception_notifiable.rb +99 -0
- data/examples/al-admin/vendor/plugins/exception_notification/lib/exception_notifier.rb +67 -0
- data/examples/al-admin/vendor/plugins/exception_notification/lib/exception_notifier_helper.rb +77 -0
- data/examples/al-admin/vendor/plugins/exception_notification/test/exception_notifier_helper_test.rb +61 -0
- data/examples/al-admin/vendor/plugins/exception_notification/test/test_helper.rb +7 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_backtrace.rhtml +1 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_environment.rhtml +7 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_inspect_model.rhtml +16 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_request.rhtml +3 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_session.rhtml +2 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/_title.rhtml +3 -0
- data/examples/al-admin/vendor/plugins/exception_notification/views/exception_notifier/exception_notification.rhtml +6 -0
- data/examples/config.yaml.example +5 -0
- data/examples/example.der +0 -0
- data/examples/example.jpg +0 -0
- data/examples/groupadd +41 -0
- data/examples/groupdel +35 -0
- data/examples/groupls +49 -0
- data/examples/groupmod +42 -0
- data/examples/lpasswd +55 -0
- data/examples/objects/group.rb +13 -0
- data/examples/objects/ou.rb +4 -0
- data/examples/objects/user.rb +20 -0
- data/examples/ouadd +38 -0
- data/examples/useradd +45 -0
- data/examples/useradd-binary +50 -0
- data/examples/userdel +34 -0
- data/examples/userls +50 -0
- data/examples/usermod +42 -0
- data/examples/usermod-binary-add +47 -0
- data/examples/usermod-binary-add-time +51 -0
- data/examples/usermod-binary-del +48 -0
- data/examples/usermod-lang-add +43 -0
- data/lib/active_ldap/acts/tree.rb +75 -0
- data/lib/active_ldap/adapter/base.rb +531 -0
- data/lib/active_ldap/adapter/ldap.rb +231 -0
- data/lib/active_ldap/adapter/ldap_ext.rb +69 -0
- data/lib/active_ldap/adapter/net_ldap.rb +292 -0
- data/lib/active_ldap/adapter/net_ldap_ext.rb +29 -0
- data/lib/active_ldap/association/belongs_to.rb +47 -0
- data/lib/active_ldap/association/belongs_to_many.rb +42 -0
- data/lib/active_ldap/association/children.rb +21 -0
- data/lib/active_ldap/association/collection.rb +83 -0
- data/lib/active_ldap/association/has_many.rb +31 -0
- data/lib/active_ldap/association/has_many_utils.rb +35 -0
- data/lib/active_ldap/association/has_many_wrap.rb +46 -0
- data/lib/active_ldap/association/proxy.rb +102 -0
- data/lib/active_ldap/associations.rb +172 -0
- data/lib/active_ldap/attributes.rb +211 -0
- data/lib/active_ldap/base.rb +1273 -0
- data/lib/active_ldap/callbacks.rb +19 -0
- data/lib/active_ldap/command.rb +49 -0
- data/lib/active_ldap/configuration.rb +147 -0
- data/lib/active_ldap/connection.rb +237 -0
- data/lib/active_ldap/distinguished_name.rb +251 -0
- data/lib/active_ldap/escape.rb +12 -0
- data/lib/active_ldap/get_text/parser.rb +159 -0
- data/lib/active_ldap/get_text.rb +8 -0
- data/lib/active_ldap/get_text_fallback.rb +53 -0
- data/lib/active_ldap/get_text_support.rb +26 -0
- data/lib/active_ldap/helper.rb +33 -0
- data/lib/active_ldap/human_readable.rb +112 -0
- data/lib/active_ldap/ldap_error.rb +74 -0
- data/lib/active_ldap/ldif.rb +52 -0
- data/lib/active_ldap/object_class.rb +93 -0
- data/lib/active_ldap/operations.rb +429 -0
- data/lib/active_ldap/populate.rb +44 -0
- data/lib/active_ldap/schema/syntaxes.rb +386 -0
- data/lib/active_ldap/schema.rb +530 -0
- data/lib/active_ldap/timeout.rb +75 -0
- data/lib/active_ldap/timeout_stub.rb +17 -0
- data/lib/active_ldap/user_password.rb +93 -0
- data/lib/active_ldap/validations.rb +171 -0
- data/lib/active_ldap.rb +982 -0
- data/po/en/active-ldap.po +3677 -0
- data/po/ja/active-ldap.po +3713 -0
- data/rails/plugin/active_ldap/README +54 -0
- data/rails/plugin/active_ldap/generators/model_active_ldap/USAGE +17 -0
- data/rails/plugin/active_ldap/generators/model_active_ldap/model_active_ldap_generator.rb +70 -0
- data/rails/plugin/active_ldap/generators/model_active_ldap/templates/fixtures.yml +11 -0
- data/rails/plugin/active_ldap/generators/model_active_ldap/templates/model_active_ldap.rb +3 -0
- data/rails/plugin/active_ldap/generators/model_active_ldap/templates/unit_test.rb +10 -0
- data/rails/plugin/active_ldap/generators/scaffold_active_ldap/scaffold_active_ldap_generator.rb +7 -0
- data/rails/plugin/active_ldap/generators/scaffold_al/scaffold_al_generator.rb +20 -0
- data/rails/plugin/active_ldap/init.rb +26 -0
- data/test/al-test-utils.rb +362 -0
- data/test/command.rb +62 -0
- data/test/config.yaml.sample +6 -0
- data/test/run-test.rb +31 -0
- data/test/test-unit-ext/always-show-result.rb +28 -0
- data/test/test-unit-ext/backtrace-filter.rb +17 -0
- data/test/test-unit-ext/long-display-for-emacs.rb +25 -0
- data/test/test-unit-ext/priority.rb +163 -0
- data/test/test-unit-ext.rb +4 -0
- data/test/test_acts_as_tree.rb +57 -0
- data/test/test_adapter.rb +98 -0
- data/test/test_associations.rb +353 -0
- data/test/test_attributes.rb +79 -0
- data/test/test_base.rb +547 -0
- data/test/test_base_per_instance.rb +55 -0
- data/test/test_bind.rb +62 -0
- data/test/test_callback.rb +35 -0
- data/test/test_configuration.rb +40 -0
- data/test/test_connection.rb +59 -0
- data/test/test_connection_per_class.rb +58 -0
- data/test/test_connection_per_dn.rb +78 -0
- data/test/test_dn.rb +160 -0
- data/test/test_find.rb +96 -0
- data/test/test_groupadd.rb +50 -0
- data/test/test_groupdel.rb +46 -0
- data/test/test_groupls.rb +107 -0
- data/test/test_groupmod.rb +51 -0
- data/test/test_ldif.rb +35 -0
- data/test/test_lpasswd.rb +75 -0
- data/test/test_object_class.rb +56 -0
- data/test/test_reflection.rb +179 -0
- data/test/test_schema.rb +433 -0
- data/test/test_syntax.rb +329 -0
- data/test/test_user.rb +227 -0
- data/test/test_user_password.rb +93 -0
- data/test/test_useradd-binary.rb +61 -0
- data/test/test_useradd.rb +57 -0
- data/test/test_userdel.rb +48 -0
- data/test/test_userls.rb +91 -0
- data/test/test_usermod-binary-add-time.rb +64 -0
- data/test/test_usermod-binary-add.rb +63 -0
- data/test/test_usermod-binary-del.rb +66 -0
- data/test/test_usermod-lang-add.rb +59 -0
- data/test/test_usermod.rb +58 -0
- data/test/test_validation.rb +110 -0
- metadata +536 -0
@@ -0,0 +1,42 @@
|
|
1
|
+
# Methods added to this helper will be available to all templates in the application.
|
2
|
+
module ApplicationHelper
|
3
|
+
include UrlHelper
|
4
|
+
|
5
|
+
def flash_box(message)
|
6
|
+
id = "flash-box"
|
7
|
+
fade_out = Proc.new {|page| page.visual_effect(:fade, id)}
|
8
|
+
flash_box_div = content_tag("div", "\n#{message}\n",
|
9
|
+
:id => id,
|
10
|
+
:onclick => update_page(&fade_out))
|
11
|
+
set_opacity = update_page {|page| page[id].setOpacity("0.8")}
|
12
|
+
effect = update_page do |page|
|
13
|
+
page.delay(5) do
|
14
|
+
fade_out.call(page)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
javascript_content = "#{set_opacity}\n#{effect}"
|
18
|
+
"#{flash_box_div}\n#{javascript_tag(javascript_content)}"
|
19
|
+
end
|
20
|
+
|
21
|
+
def switcher(prefix, title, options={}, &proc)
|
22
|
+
concat(render(:partial => "_switcher/before",
|
23
|
+
:locals => {:prefix => prefix, :title => title}),
|
24
|
+
proc.binding)
|
25
|
+
yield
|
26
|
+
concat(render(:partial => "_switcher/after",
|
27
|
+
:locals => {:prefix => prefix, :options => options}),
|
28
|
+
proc.binding)
|
29
|
+
end
|
30
|
+
|
31
|
+
def switcher_element(prefix, options={})
|
32
|
+
options[:open] = true unless options.has_key?(:open)
|
33
|
+
switch_id = "#{prefix}-switch".to_json
|
34
|
+
content_id = "#{prefix}-content".to_json
|
35
|
+
options = options_for_javascript(options)
|
36
|
+
javascript_tag("new Switcher(#{switch_id}, #{content_id}, #{options});")
|
37
|
+
end
|
38
|
+
|
39
|
+
def boolean_value(condition)
|
40
|
+
condition ? "o" : "x"
|
41
|
+
end
|
42
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
module AttributesHelper
|
2
|
+
include SyntaxesHelper
|
3
|
+
|
4
|
+
def attribute_url_for_options(attribute)
|
5
|
+
{
|
6
|
+
:controller => "attributes",
|
7
|
+
:action => "show",
|
8
|
+
:id => attribute
|
9
|
+
}
|
10
|
+
end
|
11
|
+
|
12
|
+
def link_to_attribute(attribute)
|
13
|
+
link_to(h(la_(attribute)), attribute_url_for_options(attribute))
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module UrlHelper
|
2
|
+
def login_path
|
3
|
+
url_for(:controller => "/account", :action => "login")
|
4
|
+
end
|
5
|
+
|
6
|
+
def logout_path
|
7
|
+
url_for(:controller => "/account", :action => "logout")
|
8
|
+
end
|
9
|
+
|
10
|
+
def sign_up_path
|
11
|
+
url_for(:controller => "/account", :action => "sign_up")
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
module UsersHelper
|
2
|
+
include ObjectClassesHelper
|
3
|
+
|
4
|
+
def user_link(user, with_edit=false)
|
5
|
+
user_link_if(true, user, with_edit)
|
6
|
+
end
|
7
|
+
|
8
|
+
def user_link_if(condition, user, with_edit=false)
|
9
|
+
result = link_to_if(condition, h(user.short_dn),
|
10
|
+
:action => "show", :id => user)
|
11
|
+
if with_edit and current_user and current_user.ldap_user == user
|
12
|
+
edit_link = link_to(_('Edit'), :action => 'edit', :id => user)
|
13
|
+
result << "\n(#{edit_link})"
|
14
|
+
end
|
15
|
+
result
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
class Entry < ActiveLdap::Base
|
2
|
+
ldap_mapping :prefix => "",
|
3
|
+
:classes => ["top"],
|
4
|
+
:scope => :sub
|
5
|
+
self.dn_attribute = nil
|
6
|
+
|
7
|
+
validate :always_fail
|
8
|
+
|
9
|
+
class << self
|
10
|
+
def empty?
|
11
|
+
search(:scope => :base).empty?
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def short_dn
|
16
|
+
@short_dn ||= dn == base ? dn : "#{dn_attribute}=#{id}"
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
def always_fail
|
21
|
+
errors.add("save", _("disable saving"))
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'active_ldap/user_password'
|
2
|
+
|
3
|
+
class LdapUser < ActiveLdap::Base
|
4
|
+
ldap_mapping :prefix => "ou=Users",
|
5
|
+
:classes => ["person"],
|
6
|
+
:dn_attribute => "cn"
|
7
|
+
|
8
|
+
N_("LdapUser|Password")
|
9
|
+
N_("LdapUser|Password confirmation")
|
10
|
+
attr_accessor :password
|
11
|
+
|
12
|
+
validates_presence_of :password, :password_confirmation,
|
13
|
+
:if => :password_required?
|
14
|
+
validates_length_of :password, :within => 4..40,
|
15
|
+
:if => :password_required?
|
16
|
+
validates_confirmation_of :password, :if => :password_required?
|
17
|
+
before_save :encrypt_password
|
18
|
+
|
19
|
+
class << self
|
20
|
+
def authenticate(dn, password)
|
21
|
+
user = find(dn)
|
22
|
+
user.authenticated?(password) ? user : nil
|
23
|
+
rescue ActiveLdap::EntryNotFound
|
24
|
+
nil
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def authenticated?(password)
|
29
|
+
bind(password)
|
30
|
+
true
|
31
|
+
rescue ActiveLdap::AuthenticationError,
|
32
|
+
ActiveLdap::LdapError::UnwillingToPerform
|
33
|
+
false
|
34
|
+
end
|
35
|
+
|
36
|
+
def short_dn
|
37
|
+
@short_dn ||=
|
38
|
+
(ActiveLdap::DN.parse(dn) - ActiveLdap::DN.parse(self.class.base)).to_s
|
39
|
+
end
|
40
|
+
|
41
|
+
private
|
42
|
+
def encrypt_password
|
43
|
+
return if password.blank?
|
44
|
+
hash_type = "ssha"
|
45
|
+
if /\A\{([A-Z][A-Z\d]+)\}/ =~ userPassword.to_s
|
46
|
+
hash_type = $1.downcase
|
47
|
+
end
|
48
|
+
self.user_password = ActiveLdap::UserPassword.send(hash_type, password)
|
49
|
+
end
|
50
|
+
|
51
|
+
def password_required?
|
52
|
+
user_password.blank? or !password.blank?
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,91 @@
|
|
1
|
+
require 'digest/sha1'
|
2
|
+
|
3
|
+
class User < ActiveRecord::Base
|
4
|
+
validates_presence_of :login
|
5
|
+
validates_presence_of :dn
|
6
|
+
validates_uniqueness_of :login, :dn, :case_sensitive => false
|
7
|
+
before_validation :generate_salt, :find_dn
|
8
|
+
|
9
|
+
class << self
|
10
|
+
def authenticate(login, password)
|
11
|
+
u = find_by_login(login) # need to get the salt
|
12
|
+
if u.nil?
|
13
|
+
u = new
|
14
|
+
u.login = login
|
15
|
+
u = nil unless u.save
|
16
|
+
end
|
17
|
+
u && u.authenticated?(password) ? u : nil
|
18
|
+
end
|
19
|
+
|
20
|
+
def encrypt(password, salt)
|
21
|
+
Digest::SHA1.hexdigest("--#{salt}--#{password}--")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
def encrypt(password)
|
26
|
+
self.class.encrypt(password, salt)
|
27
|
+
end
|
28
|
+
|
29
|
+
def authenticated?(password)
|
30
|
+
return false if ldap_user.nil? or ldap_user.new_entry?
|
31
|
+
ldap_user.authenticated?(password)
|
32
|
+
end
|
33
|
+
|
34
|
+
def ldap_user
|
35
|
+
@ldap_user ||= LdapUser.find(dn)
|
36
|
+
rescue ActiveLdap::EntryNotFound
|
37
|
+
if dn
|
38
|
+
LdapUser.new(dn)
|
39
|
+
else
|
40
|
+
nil
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def remember_token?
|
45
|
+
begin
|
46
|
+
remember_token_expires_at and
|
47
|
+
Time.now.utc < remember_token_expires_at and
|
48
|
+
ldap_user.connected?
|
49
|
+
rescue ActiveLdap::EntryNotFound
|
50
|
+
false
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
# These create and unset the fields required for remembering users between browser closes
|
55
|
+
def remember_me
|
56
|
+
self.remember_token_expires_at = 2.weeks.from_now.utc
|
57
|
+
self.remember_token = encrypt("#{dn}--#{remember_token_expires_at}")
|
58
|
+
save(false)
|
59
|
+
end
|
60
|
+
|
61
|
+
def forget_me
|
62
|
+
self.remember_token_expires_at = nil
|
63
|
+
self.remember_token = nil
|
64
|
+
save(false)
|
65
|
+
LdapUser.remove_connection(dn) if dn
|
66
|
+
@ldap_user = nil
|
67
|
+
end
|
68
|
+
|
69
|
+
def short_dn
|
70
|
+
ldap_user.short_dn
|
71
|
+
end
|
72
|
+
|
73
|
+
private
|
74
|
+
def generate_salt
|
75
|
+
return unless new_record?
|
76
|
+
self.salt = Digest::SHA1.hexdigest("--#{Time.now.to_s}--#{login}--")
|
77
|
+
end
|
78
|
+
|
79
|
+
def find_dn
|
80
|
+
if login.blank?
|
81
|
+
self.dn = nil
|
82
|
+
else
|
83
|
+
begin
|
84
|
+
ldap_user = LdapUser.find(login)
|
85
|
+
self.dn = ldap_user.dn
|
86
|
+
rescue ActiveLdap::EntryNotFound
|
87
|
+
self.dn = nil
|
88
|
+
end
|
89
|
+
end
|
90
|
+
end
|
91
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
<div class="attributes">
|
3
|
+
<table class="values">
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<th><%= _("Attribute name") %></th>
|
7
|
+
<th><%= _("Value") %></th>
|
8
|
+
<th><%= _("Description") %></th>
|
9
|
+
</tr>
|
10
|
+
</thead>
|
11
|
+
|
12
|
+
<tbody>
|
13
|
+
<% (entry.attribute_names(true) - ["objectClass"]).sort.each do |name| -%>
|
14
|
+
<tr class="<%= cycle('even', 'odd') %>">
|
15
|
+
<th scope="row"><%= link_to_attribute(name) %></th>
|
16
|
+
<td><%= h(entry[name, true].join(", ")) %></td>
|
17
|
+
<td><%= h(lad_(name)) %></td>
|
18
|
+
</tr>
|
19
|
+
<% end -%>
|
20
|
+
</tbody>
|
21
|
+
</table>
|
22
|
+
</div>
|
23
|
+
<% reset_cycle %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<% title ||= h(entry.short_dn) %>
|
2
|
+
<div class="entry detail">
|
3
|
+
<h2><%= title %></h2>
|
4
|
+
<span class="full-identifier"><%= h(entry.dn) %></span>
|
5
|
+
|
6
|
+
<% switcher("object-classes", _("objectClasses")) do %>
|
7
|
+
<%= render(:partial => "object_classes/object_classes",
|
8
|
+
:object => entry.classes) %>
|
9
|
+
<% end %>
|
10
|
+
|
11
|
+
<% switcher("attributes", _("Attributes")) do %>
|
12
|
+
<%= render(:partial => "_entry/attributes_information",
|
13
|
+
:locals => {:entry => entry}) %>
|
14
|
+
<% end %>
|
15
|
+
</div>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<div class="login-form">
|
2
|
+
<% form_tag do %>
|
3
|
+
<table>
|
4
|
+
<tr>
|
5
|
+
<th><label for="login"><%= _("Login:") %></label></th>
|
6
|
+
<td><%= text_field_tag 'login' %></td>
|
7
|
+
</tr>
|
8
|
+
|
9
|
+
<tr>
|
10
|
+
<th><label for="password"><%= _("Password:") %></th>
|
11
|
+
<td><%= password_field_tag 'password' %></td>
|
12
|
+
</tr>
|
13
|
+
|
14
|
+
<tr>
|
15
|
+
<td colspan="2">
|
16
|
+
<label for="remember_me"><%= _("Remember me:") %></label>
|
17
|
+
<%= check_box_tag 'remember_me' %>
|
18
|
+
</td>
|
19
|
+
</tr>
|
20
|
+
</table>
|
21
|
+
|
22
|
+
<p class="submit"><%= submit_tag(_('Log in')) %></p>
|
23
|
+
<% end %>
|
24
|
+
</div>
|
25
|
+
|
26
|
+
<%= javascript_tag("$('login').focus();") %>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
<%= error_messages_for(:user) %>
|
2
|
+
<%= error_messages_for(:system_user) %>
|
3
|
+
<% form_for(:user) do |f| %>
|
4
|
+
<p><label for="<%= @user.dn_attribute %>"><%= _("Login") %></label><br/>
|
5
|
+
<%= f.text_field(@user.dn_attribute) %></p>
|
6
|
+
|
7
|
+
<p><label for="password"><%= _("Password") %></label><br/>
|
8
|
+
<%= f.password_field(:password) %></p>
|
9
|
+
|
10
|
+
<p><label for="password_confirmation"><%= _("Confirm Password") %></label><br/>
|
11
|
+
<%= f.password_field(:password_confirmation) %></p>
|
12
|
+
|
13
|
+
<p><%= submit_tag(_('Sign up')) %></p>
|
14
|
+
|
15
|
+
<% names = @user.attribute_names(true) - ["objectClass", "userPassword"] %>
|
16
|
+
<% names.sort.each do |name| %>
|
17
|
+
<p>
|
18
|
+
<label for="<%= h name %>"><%=h la_(name) %>
|
19
|
+
<% if @required_attributes.include?(name) %>
|
20
|
+
<span class="required-attribute-mark">*</span>
|
21
|
+
<% end %>
|
22
|
+
<br />
|
23
|
+
<%= f.text_field(name) %>
|
24
|
+
</p>
|
25
|
+
<% end -%>
|
26
|
+
|
27
|
+
<p><%= submit_tag(_('Sign up')) %></p>
|
28
|
+
<% end -%>
|
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
<table class="values">
|
3
|
+
<thead>
|
4
|
+
<tr>
|
5
|
+
<th><%= _("Attribute name") %></th>
|
6
|
+
<th><%= _("Description") %></th>
|
7
|
+
</tr>
|
8
|
+
</thead>
|
9
|
+
|
10
|
+
<tbody>
|
11
|
+
<% attributes.uniq.sort.each do |attribute| -%>
|
12
|
+
<tr class="<%= cycle('even', 'odd') %>">
|
13
|
+
<td><%= link_to_attribute(attribute) %></td>
|
14
|
+
<td><%= h(lad_(attribute)) %></td>
|
15
|
+
</tr>
|
16
|
+
<% end -%>
|
17
|
+
</tbody>
|
18
|
+
</table>
|
19
|
+
<% reset_cycle %>
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<table class="values">
|
2
|
+
<tbody>
|
3
|
+
<tr class="<%= cycle('even', 'odd') %>">
|
4
|
+
<th scope="row"><%= _("Read only") %></th>
|
5
|
+
<td><%= boolean_value(attribute.read_only?) %></td>
|
6
|
+
</tr>
|
7
|
+
|
8
|
+
<tr class="<%= cycle('even', 'odd') %>">
|
9
|
+
<th scope="row"><%= _("Single value") %></th>
|
10
|
+
<td><%= boolean_value(attribute.single_value?) %></td>
|
11
|
+
</tr>
|
12
|
+
|
13
|
+
<tr class="<%= cycle('even', 'odd') %>">
|
14
|
+
<th scope="row"><%= _("Binary") %></th>
|
15
|
+
<td><%= boolean_value(attribute.binary?) %></td>
|
16
|
+
</tr>
|
17
|
+
|
18
|
+
<tr class="<%= cycle('even', 'odd') %>">
|
19
|
+
<th scope="row"><%= _("Binary required") %></th>
|
20
|
+
<td><%= boolean_value(attribute.binary_required?) %></td>
|
21
|
+
</tr>
|
22
|
+
|
23
|
+
<tr class="<%= cycle('even', 'odd') %>">
|
24
|
+
<th scope="row"><%= _("Syntax") %></th>
|
25
|
+
<td><%= link_to_syntax(attribute.syntax) %></td>
|
26
|
+
</tr>
|
27
|
+
</tbody>
|
28
|
+
</table>
|
29
|
+
<% reset_cycle %>
|
@@ -0,0 +1,31 @@
|
|
1
|
+
|
2
|
+
<div class="attribute detail">
|
3
|
+
<h2><%= h(la_(@attribute)) %></h2>
|
4
|
+
<span class="full-identifier"><%= h(@attribute.id) %></span>
|
5
|
+
|
6
|
+
<h3><%= _("Description") %></h3>
|
7
|
+
<p class="description"><%= h(lad_(@attribute)) %></p>
|
8
|
+
|
9
|
+
<% unless @attribute.aliases.empty? -%>
|
10
|
+
<%= render(:partial => "_schema/aliases", :object => @attribute.aliases) %>
|
11
|
+
<% end -%>
|
12
|
+
|
13
|
+
<% if @attribute.super_attribute -%>
|
14
|
+
<h3><%= _("Super attribute") %></h3>
|
15
|
+
<p class="super-attribute">
|
16
|
+
<%= link_to(h(la_(@attribute.super_attribute)),
|
17
|
+
:action => "show",
|
18
|
+
:id => @attribute.super_attribute) %>
|
19
|
+
</p>
|
20
|
+
<% end -%>
|
21
|
+
|
22
|
+
<% switcher("attribute-detail", _("Detail")) do %>
|
23
|
+
<%= render(:partial => "detail", :locals => {:attribute => @attribute}) %>
|
24
|
+
<% end %>
|
25
|
+
</div>
|
26
|
+
|
27
|
+
<div class="navi">
|
28
|
+
<ul>
|
29
|
+
<li><%= link_to s_('Menu|Index'), :action => 'index' %></li>
|
30
|
+
</ul>
|
31
|
+
</div>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<% have_child = !tree.children.empty? %>
|
2
|
+
<li class="<%= have_child ? 'dir' : 'file' %>">
|
3
|
+
<span class="node-dn"><%= h(tree.dn) %></span>
|
4
|
+
<span class="node-short-dn"><%= h(tree.short_dn) %></span>
|
5
|
+
<% if have_child -%>
|
6
|
+
<ul>
|
7
|
+
<%= render(:partial => "tree", :collection => tree.children) %>
|
8
|
+
</ul>
|
9
|
+
<% end -%>
|
10
|
+
</li>
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<%# -*- javascript -*- %>
|
2
|
+
var treeView = new TreeView(<%= tree_id.to_json %>,
|
3
|
+
{
|
4
|
+
move: false,
|
5
|
+
emptyImg: true,
|
6
|
+
open: true
|
7
|
+
});
|
8
|
+
|
9
|
+
treeView.addSelectItemCallback(function (element)
|
10
|
+
{
|
11
|
+
var selectedNode = element.getElementsByClassName('node-dn')[0];
|
12
|
+
var selectedDN = selectedNode.childNodes[0].nodeValue;
|
13
|
+
var failureHandler = function(transport, json)
|
14
|
+
{
|
15
|
+
var message = <%= failed_to_retrieve_entry_message.to_json %> + "\n";
|
16
|
+
message += '<span class="dn">' + selectedDN + "</span>\n";
|
17
|
+
message = "<div class=\"entry\">\n" + message + "</div>";
|
18
|
+
$(<%= entry_id.to_json %>).update(message);
|
19
|
+
}
|
20
|
+
|
21
|
+
new Ajax.Updater({success: <%= entry_id.to_json %>},
|
22
|
+
<%= url_for(:action => "entry").to_json %>,
|
23
|
+
{parameters: {dn: selectedDN},
|
24
|
+
evalScripts: true,
|
25
|
+
onFailure: failureHandler});
|
26
|
+
});
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<ul id="directory-tree">
|
2
|
+
<%= render(:partial => "tree", :object => @root) %>
|
3
|
+
</ul>
|
4
|
+
|
5
|
+
<div id="entry-information">
|
6
|
+
<%= render(:partial => "_entry/entry", :object => @root) %>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<%= javascript_tag(render(:partial => "tree_view_js",
|
10
|
+
:locals => {:tree_id => "directory-tree",
|
11
|
+
:entry_id => "entry-information"})) %>
|
12
|
+
|
13
|
+
<hr class="clear" />
|
@@ -0,0 +1,10 @@
|
|
1
|
+
|
2
|
+
<ul>
|
3
|
+
<% if logged_in? -%>
|
4
|
+
<li><span class="myself"><%= h(current_user.short_dn) %></span></li>
|
5
|
+
<li><%= link_to(s_("Menu|Logout"), logout_path) %></li>
|
6
|
+
<% else -%>
|
7
|
+
<li><%= link_to(s_("Menu|Login"), login_path) %></li>
|
8
|
+
<% end -%>
|
9
|
+
<li><%= link_to(s_("Menu|Sign up"), sign_up_path) %></li>
|
10
|
+
</ul>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
|
2
|
+
<% if logged_in? -%>
|
3
|
+
<div class="main-menu">
|
4
|
+
<ul>
|
5
|
+
<% [
|
6
|
+
[s_("Menu|Users list"), {:controller => "users"}],
|
7
|
+
[s_("Menu|Directory"), {:controller => "directory"}],
|
8
|
+
[s_("Menu|objectClass list"), {:controller => "object_classes"}],
|
9
|
+
[s_("Menu|Attribute list"), {:controller => "attributes"}],
|
10
|
+
[s_("Menu|Syntax list"), {:controller => "syntaxes"}],
|
11
|
+
].each do |label, options| -%>
|
12
|
+
<li <%= current_page?(options) ? 'class="current-page"' : "" %>>
|
13
|
+
<%= link_to(label, options) %>
|
14
|
+
</li>
|
15
|
+
<% end -%>
|
16
|
+
</ul>
|
17
|
+
</div>
|
18
|
+
<% end -%>
|