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,51 @@
|
|
1
|
+
require 'al-test-utils'
|
2
|
+
|
3
|
+
class TestGroupmod < Test::Unit::TestCase
|
4
|
+
include AlTestUtils
|
5
|
+
|
6
|
+
def setup
|
7
|
+
super
|
8
|
+
@command = File.join(@examples_dir, "groupmod")
|
9
|
+
end
|
10
|
+
|
11
|
+
priority :must
|
12
|
+
|
13
|
+
priority :normal
|
14
|
+
def test_non_exist_group
|
15
|
+
ensure_delete_group("test-group") do |name,|
|
16
|
+
assert(!@group_class.exists?(name))
|
17
|
+
assert_equal([false, "Group #{name} doesn't exist.\n"],
|
18
|
+
run_command(name, 111111))
|
19
|
+
assert(!@group_class.exists?(name))
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_modify_group
|
24
|
+
make_temporary_group do |group, password|
|
25
|
+
assert_groupmod_successfully(group.cn, group.gid_number.succ)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
private
|
30
|
+
def assert_groupmod_successfully(name, gid, *args, &block)
|
31
|
+
_wrap_assertion do
|
32
|
+
assert(@group_class.exists?(name))
|
33
|
+
args.concat([name, gid])
|
34
|
+
assert_equal([true, ""], run_command(*args, &block))
|
35
|
+
assert(@group_class.exists?(name))
|
36
|
+
|
37
|
+
group = @group_class.find(name)
|
38
|
+
assert_equal(name, group.cn)
|
39
|
+
assert_equal(gid, group.gid_number)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def assert_groupmod_failed(name, gid, message, *args, &block)
|
44
|
+
_wrap_assertion do
|
45
|
+
assert(@group_class.exists?(name))
|
46
|
+
args.concat([name, gid])
|
47
|
+
assert_equal([false, message], run_command(*args, &block))
|
48
|
+
assert(@group_class.exists?(name))
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
data/test/test_ldif.rb
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'al-test-utils'
|
2
|
+
|
3
|
+
class TestLDIF < Test::Unit::TestCase
|
4
|
+
include AlTestUtils
|
5
|
+
|
6
|
+
def setup
|
7
|
+
end
|
8
|
+
|
9
|
+
def teardown
|
10
|
+
end
|
11
|
+
|
12
|
+
priority :must
|
13
|
+
def test_version_number
|
14
|
+
assert_invalid_ldif("unsupported version: 0", "version: 0")
|
15
|
+
assert_invalid_ldif("unsupported version: 0", "version: 0")
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_version_spec
|
19
|
+
assert_invalid_ldif("version spec is missing", "")
|
20
|
+
assert_invalid_ldif("version spec is missing", "version:")
|
21
|
+
assert_invalid_ldif("version spec is missing", "version: ")
|
22
|
+
assert_invalid_ldif("version spec is missing", "version: XXX")
|
23
|
+
end
|
24
|
+
|
25
|
+
priority :normal
|
26
|
+
|
27
|
+
private
|
28
|
+
def assert_invalid_ldif(reason, ldif)
|
29
|
+
exception = assert_raise(ActiveLdap::LdifInvalid) do
|
30
|
+
ActiveLdap::Ldif.parse(ldif)
|
31
|
+
end
|
32
|
+
assert_equal(ldif, exception.ldif)
|
33
|
+
assert_equal(_(reason), exception.reason)
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'al-test-utils'
|
2
|
+
|
3
|
+
class TestLPasswd < Test::Unit::TestCase
|
4
|
+
include AlTestUtils
|
5
|
+
|
6
|
+
def setup
|
7
|
+
super
|
8
|
+
@command = File.join(@examples_dir, "lpasswd")
|
9
|
+
make_ou("People")
|
10
|
+
@user_class.instance_variable_set("@prefix", "ou=People")
|
11
|
+
end
|
12
|
+
|
13
|
+
priority :must
|
14
|
+
|
15
|
+
priority :normal
|
16
|
+
def test_non_exist_user
|
17
|
+
ensure_delete_user("test-user") do |uid,|
|
18
|
+
assert(!@user_class.exists?(uid))
|
19
|
+
assert_equal([false, "User #{uid} doesn't exist.\n"], run_command(uid))
|
20
|
+
assert(!@user_class.exists?(uid))
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
def test_change_password
|
25
|
+
make_temporary_user do |user, password|
|
26
|
+
new_password = "new#{password}"
|
27
|
+
assert_lpasswd_successfully(user.uid, password, new_password)
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def test_password_mismatch
|
32
|
+
make_temporary_user do |user, password|
|
33
|
+
message = "[#{user.dn}] Password: \n" * 2
|
34
|
+
message = "#{message}Password mismatch!\n" * 3
|
35
|
+
assert_lpasswd_failed(user.id, password, message) do |input, output|
|
36
|
+
3.times do
|
37
|
+
output.puts("new#{password}1")
|
38
|
+
output.puts("new#{password}2")
|
39
|
+
output.flush
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
private
|
46
|
+
def assert_lpasswd_successfully(name, current, new, *args, &block)
|
47
|
+
_wrap_assertion do
|
48
|
+
assert(@user_class.exists?(name))
|
49
|
+
assert_send([ActiveLdap::UserPassword, :valid?,
|
50
|
+
current, @user_class.find(name).user_password])
|
51
|
+
args.concat([name])
|
52
|
+
block ||= Proc.new do |input, output|
|
53
|
+
output.puts(new)
|
54
|
+
output.puts(new)
|
55
|
+
output.flush
|
56
|
+
end
|
57
|
+
assert_equal([true, "[#{@user_class.find(name).dn}] Password: \n" * 2],
|
58
|
+
run_command(*args, &block))
|
59
|
+
assert_send([ActiveLdap::UserPassword, :valid?,
|
60
|
+
new, @user_class.find(name).user_password])
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
def assert_lpasswd_failed(name, current, message, *args, &block)
|
65
|
+
_wrap_assertion do
|
66
|
+
assert(@user_class.exists?(name))
|
67
|
+
assert_send([ActiveLdap::UserPassword, :valid?,
|
68
|
+
current, @user_class.find(name).user_password])
|
69
|
+
args.concat([name])
|
70
|
+
assert_equal([false, message], run_command(*args, &block))
|
71
|
+
assert_send([ActiveLdap::UserPassword, :valid?,
|
72
|
+
current, @user_class.find(name).user_password])
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
@@ -0,0 +1,56 @@
|
|
1
|
+
require 'al-test-utils'
|
2
|
+
|
3
|
+
class TestObjectClass < Test::Unit::TestCase
|
4
|
+
include AlTestUtils
|
5
|
+
|
6
|
+
priority :must
|
7
|
+
|
8
|
+
priority :normal
|
9
|
+
def test_case_insensitive_match
|
10
|
+
assert_nothing_raised do
|
11
|
+
@group_class.instantiate(["cn=test-group,#{@group_class.base}",
|
12
|
+
{
|
13
|
+
:cn => "test-group",
|
14
|
+
:objectClass => ["TOP", "posixgroup"],
|
15
|
+
}])
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def test_ensure_recommended_classes
|
20
|
+
make_temporary_group do |group|
|
21
|
+
added_class = "labeledURIObject"
|
22
|
+
|
23
|
+
assert_equal([], group.class.recommended_classes)
|
24
|
+
group.class.recommended_classes += [added_class]
|
25
|
+
assert_equal([added_class], group.class.recommended_classes)
|
26
|
+
|
27
|
+
assert_equal([added_class],
|
28
|
+
group.class.recommended_classes - group.classes)
|
29
|
+
group.ensure_recommended_classes
|
30
|
+
assert_equal([],
|
31
|
+
group.class.recommended_classes - group.classes)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
def test_unknown_object_class
|
36
|
+
make_temporary_group do |group|
|
37
|
+
assert_raises(ActiveLdap::ObjectClassError) do
|
38
|
+
group.add_class("unknownObjectClass")
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def test_remove_required_class
|
44
|
+
make_temporary_group do |group|
|
45
|
+
assert_raises(ActiveLdap::RequiredObjectClassMissed) do
|
46
|
+
group.remove_class("posixGroup")
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_invalid_object_class_value
|
52
|
+
make_temporary_group do |group|
|
53
|
+
assert_raises(TypeError) {group.add_class(:posixAccount)}
|
54
|
+
end
|
55
|
+
end
|
56
|
+
end
|
@@ -0,0 +1,179 @@
|
|
1
|
+
require 'al-test-utils'
|
2
|
+
|
3
|
+
class TestReflection < Test::Unit::TestCase
|
4
|
+
include AlTestUtils
|
5
|
+
|
6
|
+
priority :must
|
7
|
+
|
8
|
+
priority :normal
|
9
|
+
def test_base_class
|
10
|
+
assert_equal(ActiveLdap::Base, ActiveLdap::Base.base_class)
|
11
|
+
assert_equal(@user_class, @user_class.base_class)
|
12
|
+
sub_user_class = Class.new(@user_class)
|
13
|
+
assert_equal(@user_class, sub_user_class.base_class)
|
14
|
+
end
|
15
|
+
|
16
|
+
def test_respond_to?
|
17
|
+
make_temporary_user do |user, password|
|
18
|
+
attributes = (user.must + user.may).collect(&:name)
|
19
|
+
_wrap_assertion do
|
20
|
+
attributes.each do |name|
|
21
|
+
assert(user.respond_to?(name), name)
|
22
|
+
assert(user.respond_to?("#{name}="), "#{name}=")
|
23
|
+
assert(user.respond_to?("#{name}?"), "#{name}?")
|
24
|
+
assert(user.respond_to?("#{name}_before_type_cast"),
|
25
|
+
"#{name}_before_type_cast")
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
user.replace_class(user.class.required_classes)
|
30
|
+
new_attributes = collect_attributes(user.class.required_classes)
|
31
|
+
|
32
|
+
_wrap_assertion do
|
33
|
+
assert_not_equal([], new_attributes)
|
34
|
+
new_attributes.each do |name|
|
35
|
+
assert(user.respond_to?(name), name)
|
36
|
+
assert(user.respond_to?("#{name}="), "#{name}=")
|
37
|
+
assert(user.respond_to?("#{name}?"), "#{name}?")
|
38
|
+
assert(user.respond_to?("#{name}_before_type_cast"),
|
39
|
+
"#{name}_before_type_cast")
|
40
|
+
end
|
41
|
+
|
42
|
+
remained_attributes = (attributes - new_attributes)
|
43
|
+
assert_not_equal([], remained_attributes)
|
44
|
+
remained_attributes.each do |name|
|
45
|
+
assert(!user.respond_to?(name), name)
|
46
|
+
assert(!user.respond_to?("#{name}="), "#{name}=")
|
47
|
+
assert(!user.respond_to?("#{name}?"), "#{name}?")
|
48
|
+
assert(!user.respond_to?("#{name}_before_type_cast"),
|
49
|
+
"#{name}_before_type_cast")
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
def test_methods
|
56
|
+
make_temporary_user do |user, password|
|
57
|
+
assert_equal(user.methods.uniq.size, user.methods.size)
|
58
|
+
assert_equal(user.methods(false).uniq.size, user.methods(false).size)
|
59
|
+
end
|
60
|
+
|
61
|
+
make_temporary_user do |user, password|
|
62
|
+
attributes = user.must.collect(&:name) + user.may.collect(&:name)
|
63
|
+
attributes -= ["objectClass"]
|
64
|
+
assert_equal([], attributes - user.methods)
|
65
|
+
assert_equal([], attributes - user.methods(false))
|
66
|
+
|
67
|
+
assert_methods_with_only_required_classes(user, attributes)
|
68
|
+
end
|
69
|
+
|
70
|
+
make_temporary_user do |user, password|
|
71
|
+
user.remove_class("inetOrgPerson")
|
72
|
+
attributes = user.must.collect(&:name) + user.may.collect(&:name)
|
73
|
+
attributes -= ["objectClass"]
|
74
|
+
assert_equal([], attributes - user.methods)
|
75
|
+
assert_equal([], attributes - user.methods(false))
|
76
|
+
|
77
|
+
assert_methods_with_only_required_classes(user, attributes)
|
78
|
+
end
|
79
|
+
|
80
|
+
make_temporary_user do |user, password|
|
81
|
+
attributes = user.must.collect(&:name) + user.may.collect(&:name)
|
82
|
+
attributes -= ["objectClass"]
|
83
|
+
attributes = attributes.collect {|x| x.downcase}
|
84
|
+
assert_not_equal([], attributes - user.methods)
|
85
|
+
assert_not_equal([], attributes - user.methods(false))
|
86
|
+
|
87
|
+
normalize_attributes_list = Proc.new do |*attributes_list|
|
88
|
+
attributes_list.collect do |attrs|
|
89
|
+
attrs.collect {|x| x.downcase}
|
90
|
+
end
|
91
|
+
end
|
92
|
+
assert_methods_with_only_required_classes(user, attributes,
|
93
|
+
&normalize_attributes_list)
|
94
|
+
end
|
95
|
+
|
96
|
+
make_temporary_user do |user, password|
|
97
|
+
attributes = user.must.collect(&:name) + user.may.collect(&:name)
|
98
|
+
attributes -= ["objectClass"]
|
99
|
+
attributes = attributes.collect do |x|
|
100
|
+
Inflector.underscore(x)
|
101
|
+
end
|
102
|
+
assert_equal([], attributes - user.methods)
|
103
|
+
assert_equal([], attributes - user.methods(false))
|
104
|
+
|
105
|
+
normalize_attributes_list = Proc.new do |*attributes_list|
|
106
|
+
attributes_list.collect do |attrs|
|
107
|
+
attrs.collect {|x| Inflector.underscore(x)}
|
108
|
+
end
|
109
|
+
end
|
110
|
+
assert_methods_with_only_required_classes(user, attributes,
|
111
|
+
&normalize_attributes_list)
|
112
|
+
end
|
113
|
+
|
114
|
+
make_temporary_user do |user, password|
|
115
|
+
user.remove_class("inetOrgPerson")
|
116
|
+
attributes = user.must.collect(&:name) + user.may.collect(&:name)
|
117
|
+
attributes -= ["objectClass"]
|
118
|
+
attributes = attributes.collect do |x|
|
119
|
+
Inflector.underscore(x)
|
120
|
+
end
|
121
|
+
assert_equal([], attributes - user.methods)
|
122
|
+
assert_equal([], attributes - user.methods(false))
|
123
|
+
|
124
|
+
normalize_attributes_list = Proc.new do |*attributes_list|
|
125
|
+
attributes_list.collect do |attrs|
|
126
|
+
attrs.collect {|x| Inflector.underscore(x)}
|
127
|
+
end
|
128
|
+
end
|
129
|
+
assert_methods_with_only_required_classes(user, attributes,
|
130
|
+
&normalize_attributes_list)
|
131
|
+
end
|
132
|
+
end
|
133
|
+
|
134
|
+
def test_attribute_names
|
135
|
+
make_temporary_user do |user, password|
|
136
|
+
attributes = collect_attributes(user.classes)
|
137
|
+
assert_equal([], attributes.uniq - user.attribute_names)
|
138
|
+
assert_equal([], user.attribute_names - attributes.uniq)
|
139
|
+
end
|
140
|
+
end
|
141
|
+
|
142
|
+
def assert_methods_with_only_required_classes(object, attributes)
|
143
|
+
old_classes = (object.classes - object.class.required_classes).uniq
|
144
|
+
old_attributes = collect_attributes(old_classes, false).uniq.sort
|
145
|
+
required_attributes = collect_attributes(object.class.required_classes,
|
146
|
+
false).uniq.sort
|
147
|
+
if block_given?
|
148
|
+
old_attributes, required_attributes =
|
149
|
+
yield(old_attributes, required_attributes)
|
150
|
+
end
|
151
|
+
|
152
|
+
object.replace_class(object.class.required_classes)
|
153
|
+
|
154
|
+
assert_equal([],
|
155
|
+
old_attributes -
|
156
|
+
(attributes - object.methods - required_attributes) -
|
157
|
+
required_attributes)
|
158
|
+
assert_equal([],
|
159
|
+
old_attributes -
|
160
|
+
(attributes - object.methods(false) - required_attributes) -
|
161
|
+
required_attributes)
|
162
|
+
end
|
163
|
+
|
164
|
+
def collect_attributes(object_classes, with_aliases=true)
|
165
|
+
attributes = []
|
166
|
+
object_classes.each do |object_class|
|
167
|
+
object_klass = ActiveLdap::Base.schema.object_class(object_class)
|
168
|
+
if with_aliases
|
169
|
+
(object_klass.must + object_klass.may).each do |attribute|
|
170
|
+
attributes << attribute.name
|
171
|
+
attributes.concat(attribute.aliases)
|
172
|
+
end
|
173
|
+
else
|
174
|
+
attributes.concat((object_klass.must + object_klass.may).collect(&:name))
|
175
|
+
end
|
176
|
+
end
|
177
|
+
attributes
|
178
|
+
end
|
179
|
+
end
|