ruby-jss 4.2.2 → 4.2.4b1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGES.md +18 -1
- data/LICENSE.txt +5 -3
- data/README.md +3 -1
- data/bin/cgrouper +4 -22
- data/bin/jamfHelperBackgrounder +4 -22
- data/bin/netseg-update +4 -22
- data/data/ruby-jss.conf.example +4 -22
- data/lib/jamf/api/classic/api_objects/account.rb +4 -22
- data/lib/jamf/api/classic/api_objects/advanced_computer_search.rb +4 -22
- data/lib/jamf/api/classic/api_objects/advanced_mobile_device_search.rb +4 -22
- data/lib/jamf/api/classic/api_objects/advanced_user_search.rb +4 -22
- data/lib/jamf/api/classic/api_objects/building.rb +4 -22
- data/lib/jamf/api/classic/api_objects/categorizable.rb +4 -22
- data/lib/jamf/api/classic/api_objects/category.rb +7 -24
- data/lib/jamf/api/classic/api_objects/computer.rb +6 -23
- data/lib/jamf/api/classic/api_objects/computer_extension_attribute.rb +2 -20
- data/lib/jamf/api/classic/api_objects/computer_group.rb +2 -20
- data/lib/jamf/api/classic/api_objects/computer_invitation.rb +6 -23
- data/lib/jamf/api/classic/api_objects/creatable.rb +4 -22
- data/lib/jamf/api/classic/api_objects/criteriable/criteria.rb +4 -22
- data/lib/jamf/api/classic/api_objects/criteriable/criterion.rb +2 -20
- data/lib/jamf/api/classic/api_objects/criteriable.rb +2 -20
- data/lib/jamf/api/classic/api_objects/department.rb +4 -22
- data/lib/jamf/api/classic/api_objects/directory_binding.rb +221 -247
- data/lib/jamf/api/classic/api_objects/directory_binding_type/active_directory.rb +492 -526
- data/lib/jamf/api/classic/api_objects/directory_binding_type/admitmac.rb +27 -55
- data/lib/jamf/api/classic/api_objects/directory_binding_type/centrify.rb +191 -220
- data/lib/jamf/api/classic/api_objects/directory_binding_type/directory_binding_type.rb +4 -22
- data/lib/jamf/api/classic/api_objects/directory_binding_type/open_directory.rb +142 -169
- data/lib/jamf/api/classic/api_objects/directory_binding_type/powerbroker_identity_services.rb +37 -57
- data/lib/jamf/api/classic/api_objects/directory_binding_type.rb +4 -22
- data/lib/jamf/api/classic/api_objects/disk_encryption_configuration.rb +90 -84
- data/lib/jamf/api/classic/api_objects/distribution_point.rb +6 -24
- data/lib/jamf/api/classic/api_objects/dock_item.rb +11 -34
- data/lib/jamf/api/classic/api_objects/ebook.rb +4 -22
- data/lib/jamf/api/classic/api_objects/extendable.rb +2 -20
- data/lib/jamf/api/classic/api_objects/ibeacon.rb +6 -23
- data/lib/jamf/api/classic/api_objects/icon.rb +5 -23
- data/lib/jamf/api/classic/api_objects/ldap_server.rb +2 -20
- data/lib/jamf/api/classic/api_objects/locatable.rb +4 -22
- data/lib/jamf/api/classic/api_objects/mac_application.rb +6 -23
- data/lib/jamf/api/classic/api_objects/management_history/audit_event.rb +4 -25
- data/lib/jamf/api/classic/api_objects/management_history/casper_imaging_log.rb +5 -24
- data/lib/jamf/api/classic/api_objects/management_history/casper_remote_log.rb +4 -25
- data/lib/jamf/api/classic/api_objects/management_history/computer_usage_log.rb +4 -25
- data/lib/jamf/api/classic/api_objects/management_history/ebook.rb +4 -26
- data/lib/jamf/api/classic/api_objects/management_history/hash_like.rb +4 -22
- data/lib/jamf/api/classic/api_objects/management_history/mac_app_store_app.rb +4 -26
- data/lib/jamf/api/classic/api_objects/management_history/mdm_command.rb +4 -25
- data/lib/jamf/api/classic/api_objects/management_history/mobile_device_app.rb +4 -25
- data/lib/jamf/api/classic/api_objects/management_history/policy_log.rb +4 -25
- data/lib/jamf/api/classic/api_objects/management_history/screen_sharing_log.rb +4 -25
- data/lib/jamf/api/classic/api_objects/management_history/user_location_change.rb +4 -25
- data/lib/jamf/api/classic/api_objects/management_history.rb +4 -22
- data/lib/jamf/api/classic/api_objects/matchable.rb +4 -22
- data/lib/jamf/api/classic/api_objects/mdm.rb +6 -23
- data/lib/jamf/api/classic/api_objects/mobile_device.rb +7 -23
- data/lib/jamf/api/classic/api_objects/mobile_device_application.rb +7 -23
- data/lib/jamf/api/classic/api_objects/mobile_device_configuration_profile.rb +4 -22
- data/lib/jamf/api/classic/api_objects/mobile_device_extension_attribute.rb +3 -20
- data/lib/jamf/api/classic/api_objects/mobile_device_group.rb +4 -22
- data/lib/jamf/api/classic/api_objects/netboot_server.rb +4 -22
- data/lib/jamf/api/classic/api_objects/network_segment.rb +7 -23
- data/lib/jamf/api/classic/api_objects/osx_configuration_profile.rb +2 -20
- data/lib/jamf/api/classic/api_objects/package.rb +6 -23
- data/lib/jamf/api/classic/api_objects/patch_external_source.rb +7 -24
- data/lib/jamf/api/classic/api_objects/patch_internal_source.rb +4 -22
- data/lib/jamf/api/classic/api_objects/patch_policy.rb +6 -23
- data/lib/jamf/api/classic/api_objects/patch_title/version.rb +4 -22
- data/lib/jamf/api/classic/api_objects/patch_title.rb +8 -24
- data/lib/jamf/api/classic/api_objects/peripheral.rb +7 -24
- data/lib/jamf/api/classic/api_objects/peripheral_type.rb +7 -26
- data/lib/jamf/api/classic/api_objects/policy.rb +8 -24
- data/lib/jamf/api/classic/api_objects/printer.rb +384 -388
- data/lib/jamf/api/classic/api_objects/purchasable.rb +4 -22
- data/lib/jamf/api/classic/api_objects/removable_macaddr.rb +4 -22
- data/lib/jamf/api/classic/api_objects/restricted_software.rb +7 -24
- data/lib/jamf/api/classic/api_objects/scopable/scope.rb +2 -19
- data/lib/jamf/api/classic/api_objects/scopable.rb +6 -23
- data/lib/jamf/api/classic/api_objects/script.rb +5 -23
- data/lib/jamf/api/classic/api_objects/self_servable.rb +4 -22
- data/lib/jamf/api/classic/api_objects/sitable.rb +4 -22
- data/lib/jamf/api/classic/api_objects/site.rb +2 -20
- data/lib/jamf/api/classic/api_objects/software_update_server.rb +4 -22
- data/lib/jamf/api/classic/api_objects/updatable.rb +4 -22
- data/lib/jamf/api/classic/api_objects/uploadable.rb +4 -22
- data/lib/jamf/api/classic/api_objects/user.rb +6 -24
- data/lib/jamf/api/classic/api_objects/user_extension_attribute.rb +2 -19
- data/lib/jamf/api/classic/api_objects/user_group.rb +4 -22
- data/lib/jamf/api/classic/api_objects/vpp_account.rb +6 -23
- data/lib/jamf/api/classic/api_objects/vppable.rb +4 -22
- data/lib/jamf/api/classic/api_objects/web_hook.rb +4 -20
- data/lib/jamf/api/classic/base_classes/advanced_search.rb +9 -25
- data/lib/jamf/api/classic/base_classes/api_object.rb +7 -24
- data/lib/jamf/api/classic/base_classes/configuration_profile.rb +5 -22
- data/lib/jamf/api/classic/base_classes/extension_attribute.rb +8 -25
- data/lib/jamf/api/classic/base_classes/group.rb +6 -22
- data/lib/jamf/api/classic/base_classes/patch_source.rb +4 -22
- data/lib/jamf/api/classic/xml_workaround.rb +4 -22
- data/lib/jamf/api/connection/attributes.rb +4 -21
- data/lib/jamf/api/connection/cache.rb +4 -21
- data/lib/jamf/api/connection/classic_api.rb +4 -21
- data/lib/jamf/api/connection/connect.rb +4 -21
- data/lib/jamf/api/connection/constants.rb +7 -23
- data/lib/jamf/api/connection/default_connection.rb +4 -21
- data/lib/jamf/api/connection/jamf_pro_api.rb +4 -21
- data/lib/jamf/api/connection/jamf_pro_api_error.rb +2 -20
- data/lib/jamf/api/connection/token.rb +2 -20
- data/lib/jamf/api/connection.rb +4 -21
- data/lib/jamf/api/jamf_pro/api_objects/api_client.rb +2 -20
- data/lib/jamf/api/jamf_pro/api_objects/api_integration.rb +2 -20
- data/lib/jamf/api/jamf_pro/api_objects/api_role.rb +2 -20
- data/lib/jamf/api/jamf_pro/api_objects/computer_prestage.rb +2 -23
- data/lib/jamf/api/jamf_pro/api_objects/device_enrollment.rb +2 -20
- data/lib/jamf/api/jamf_pro/api_objects/inventory_preload_record.rb +2 -20
- data/lib/jamf/api/jamf_pro/api_objects/j_building.rb +2 -20
- data/lib/jamf/api/jamf_pro/api_objects/j_package.rb +2 -20
- data/lib/jamf/api/jamf_pro/api_objects/managed_software_updates/plan.rb +2 -19
- data/lib/jamf/api/jamf_pro/api_objects/managed_software_updates.rb +2 -19
- data/lib/jamf/api/jamf_pro/api_objects/mobile_device_prestage.rb +2 -20
- data/lib/jamf/api/jamf_pro/base_classes/oapi_object.rb +2 -19
- data/lib/jamf/api/jamf_pro/mixins/bulk_deletable.rb +2 -19
- data/lib/jamf/api/jamf_pro/mixins/change_log.rb +2 -20
- data/lib/jamf/api/jamf_pro/mixins/collection_resource.rb +2 -20
- data/lib/jamf/api/jamf_pro/mixins/computer_recovery_lock.rb +2 -19
- data/lib/jamf/api/jamf_pro/mixins/filevault.rb +2 -19
- data/lib/jamf/api/jamf_pro/mixins/filterable.rb +2 -19
- data/lib/jamf/api/jamf_pro/mixins/immutable.rb +2 -19
- data/lib/jamf/api/jamf_pro/mixins/jpapi_resource.rb +2 -20
- data/lib/jamf/api/jamf_pro/mixins/lockable.rb +2 -19
- data/lib/jamf/api/jamf_pro/mixins/macos_managed_updates.rb +2 -19
- data/lib/jamf/api/jamf_pro/mixins/macos_redeploy_mgmt_framework.rb +2 -19
- data/lib/jamf/api/jamf_pro/mixins/prestage.rb +2 -20
- data/lib/jamf/api/jamf_pro/mixins/sortable.rb +2 -19
- data/lib/jamf/api/jamf_pro/mixins/uncreatable.rb +2 -19
- data/lib/jamf/api/jamf_pro/mixins/undeletable.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/account_group.rb +12 -31
- data/lib/jamf/api/jamf_pro/oapi_schemas/account_preferences_v1.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/account_settings_request.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/account_settings_response.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/api_error.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/api_error_cause.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/api_integration_request.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/api_integration_response.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/api_integration_search_result.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/api_role.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/api_role_request.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/api_role_result.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/assign_remove_profile_response_sync_state.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/auth_account_v1.rb +11 -30
- data/lib/jamf/api/jamf_pro/oapi_schemas/authentication_type.rb +13 -32
- data/lib/jamf/api/jamf_pro/oapi_schemas/authorization_v1.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/available_updates.rb +4 -25
- data/lib/jamf/api/jamf_pro/oapi_schemas/building.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/building_search_results.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_application.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_attachment.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_certificate.rb +12 -31
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_configuration_profile.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching.rb +10 -29
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_alert.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_cache_detail.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error.rb +2 -23
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_data_migration_error_user_info.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent.rb +2 -23
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_alert.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_capabilities.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_details.rb +2 -23
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_content_caching_parent_local_network.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk.rb +2 -23
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_disk_encryption.rb +7 -26
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_extension_attribute.rb +12 -31
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_font.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_general.rb +2 -23
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_hardware.rb +2 -23
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_ibeacon.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory.rb +2 -23
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_inventory_file_vault.rb +7 -26
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_licensed_software.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_local_user_account.rb +12 -31
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_mdm_capability.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_operating_system.rb +8 -27
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_package_receipts.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition.rb +6 -25
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_encryption.rb +2 -23
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_partition_file_vault2_state.rb +14 -33
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_plugin.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_search_results_v3.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_prestage_v3.rb +6 -26
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_printer.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_purchase.rb +2 -23
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_remote_management.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_section.rb +28 -47
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_security.rb +28 -47
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_service.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_software_update.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_storage.rb +2 -23
- data/lib/jamf/api/jamf_pro/oapi_schemas/computer_user_and_location.rb +2 -23
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_device_search_results.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_disown_response.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_search_results.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_instance_sync_status.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_prestage_v2.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/device_enrollment_token.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/dss_declaration.rb +8 -27
- data/lib/jamf/api/jamf_pro/oapi_schemas/dss_declarations.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/enrollment_method.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_computer_prestage_v3.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/get_mobile_device_prestage_v2.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/group_membership.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/history_search_results_v1.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_extension_attribute.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_search_results_v2.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/inventory_preload_record_v2.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/location_information.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/location_information_v2.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/mac_os_managed_software_update_response.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_event_store.rb +4 -25
- data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_group_post.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_post.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_post_response.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_toggle.rb +4 -25
- data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_toggle_status.rb +14 -33
- data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plan_toggle_status_wrapper.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_plans.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_status.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/managed_software_update_statuses.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_name_v2.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_names_v2.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_search_results_v2.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/mobile_device_prestage_v2.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/o_auth_client_credentials.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_note.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/object_history_v1.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/package.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/packages_search_results.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/plan_configuration_post.rb +17 -36
- data/lib/jamf/api/jamf_pro/oapi_schemas/plan_device.rb +7 -26
- data/lib/jamf/api/jamf_pro/oapi_schemas/plan_device_post.rb +7 -26
- data/lib/jamf/api/jamf_pro/oapi_schemas/plan_device_response.rb +2 -23
- data/lib/jamf/api/jamf_pro/oapi_schemas/plan_group_post.rb +6 -25
- data/lib/jamf/api/jamf_pro/oapi_schemas/plan_search_results.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/plan_status.rb +36 -55
- data/lib/jamf/api/jamf_pro/oapi_schemas/post_computer_prestage_v3.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_purchasing_information_v2.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_assignment_v2.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_response_v2.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/prestage_scope_v2.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/put_computer_prestage_v3.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/put_mobile_device_prestage_v2.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/redeploy_jamf_management_framework_response.rb +2 -19
- data/lib/jamf/api/jamf_pro/oapi_schemas/v1_site.rb +3 -24
- data/lib/jamf/api/jamf_pro/oapi_schemas.rb +2 -19
- data/lib/jamf/api/jamf_pro/other_classes/change_log_entry.rb +2 -20
- data/lib/jamf/api/jamf_pro/other_classes/ip_address.rb +2 -20
- data/lib/jamf/api/jamf_pro/other_classes/pager.rb +2 -19
- data/lib/jamf/api/jamf_pro/other_classes/timestamp.rb +2 -20
- data/lib/jamf/base_class.rb +2 -19
- data/lib/jamf/client/jamf_binary.rb +4 -22
- data/lib/jamf/client/jamf_helper.rb +4 -22
- data/lib/jamf/client/management_action.rb +4 -22
- data/lib/jamf/client.rb +4 -22
- data/lib/jamf/composer.rb +2 -20
- data/lib/jamf/configuration.rb +2 -20
- data/lib/jamf/constants.rb +2 -20
- data/lib/jamf/db_connection.rb +5 -23
- data/lib/jamf/deprecations/deprecated_api_connection_class.rb +2 -20
- data/lib/jamf/deprecations/deprecated_api_constant.rb +2 -20
- data/lib/jamf/deprecations/deprecated_config_constant.rb +2 -20
- data/lib/jamf/deprecations.rb +4 -22
- data/lib/jamf/exceptions.rb +2 -20
- data/lib/jamf/oapi_validate.rb +2 -19
- data/lib/jamf/ruby_extensions/array/predicates.rb +2 -20
- data/lib/jamf/ruby_extensions/array/utils.rb +2 -20
- data/lib/jamf/ruby_extensions/array.rb +2 -20
- data/lib/jamf/ruby_extensions/filetest/predicates.rb +2 -20
- data/lib/jamf/ruby_extensions/filetest.rb +2 -20
- data/lib/jamf/ruby_extensions/hash/utils.rb +2 -44
- data/lib/jamf/ruby_extensions/hash.rb +2 -20
- data/lib/jamf/ruby_extensions/ipaddr/utils.rb +2 -20
- data/lib/jamf/ruby_extensions/ipaddr.rb +4 -22
- data/lib/jamf/ruby_extensions/object/predicates.rb +2 -20
- data/lib/jamf/ruby_extensions/object.rb +2 -20
- data/lib/jamf/ruby_extensions/pathname/predicates.rb +2 -20
- data/lib/jamf/ruby_extensions/pathname/utils.rb +2 -20
- data/lib/jamf/ruby_extensions/pathname.rb +2 -20
- data/lib/jamf/ruby_extensions/string/conversions.rb +2 -20
- data/lib/jamf/ruby_extensions/string/predicates.rb +2 -20
- data/lib/jamf/ruby_extensions/string.rb +2 -20
- data/lib/jamf/ruby_extensions/time/utils.rb +4 -22
- data/lib/jamf/ruby_extensions/time.rb +4 -22
- data/lib/jamf/ruby_extensions.rb +4 -22
- data/lib/jamf/utility.rb +2 -20
- data/lib/jamf/validate.rb +2 -19
- data/lib/jamf/version.rb +5 -23
- data/lib/jamf/zeitwerk_config.rb +2 -20
- data/lib/jamf.rb +2 -20
- data/lib/jss-api.rb +4 -22
- data/lib/jss.rb +4 -22
- data/lib/ruby-jss.rb +4 -22
- data/test/bin/runtests +4 -22
- data/test/lib/jamf_test/APITest.rb +4 -22
- data/test/lib/jamf_test/advanced_search.rb +4 -22
- data/test/lib/jamf_test/auth.rb +4 -22
- data/test/lib/jamf_test/collection_tests.rb +4 -22
- data/test/lib/jamf_test/prestage_tests.rb +4 -22
- data/test/lib/jamf_test.rb +4 -22
- data/test/tests/advanced_computer_search.rb +4 -22
- data/test/tests/advanced_mobile_device_search.rb +4 -22
- data/test/tests/advanced_user_search.rb +4 -22
- data/test/tests/building.rb +4 -22
- data/test/tests/category.rb +4 -22
- data/test/tests/computer.rb +4 -22
- data/test/tests/computer_group.rb +4 -22
- data/test/tests/computer_prestage.rb +4 -22
- data/test/tests/department.rb +4 -22
- data/test/tests/device_enrollment.rb +4 -22
- data/test/tests/inventory_preload_record.rb +4 -22
- data/test/tests/j_building.rb +4 -22
- data/test/tests/j_package.rb +4 -22
- data/test/tests/mobile_device.rb +4 -22
- data/test/tests/mobile_device_prestage.rb +4 -22
- data/test/tests/policy.rb +4 -22
- metadata +4 -4
|
@@ -1,539 +1,505 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
### with the following modification; you may not use this file except in
|
|
6
|
-
### compliance with the Apache License and the following modification to it:
|
|
7
|
-
### Section 6. Trademarks. is deleted and replaced with:
|
|
8
|
-
###
|
|
9
|
-
### 6. Trademarks. This License does not grant permission to use the trade
|
|
10
|
-
### names, trademarks, service marks, or product names of the Licensor
|
|
11
|
-
### and its affiliates, except as required to comply with Section 4(c) of
|
|
12
|
-
### the License and to reproduce the content of the NOTICE file.
|
|
13
|
-
###
|
|
14
|
-
### You may obtain a copy of the Apache License at
|
|
15
|
-
###
|
|
16
|
-
### http://www.apache.org/licenses/LICENSE-2.0
|
|
17
|
-
###
|
|
18
|
-
### Unless required by applicable law or agreed to in writing, software
|
|
19
|
-
### distributed under the Apache License with the above modification is
|
|
20
|
-
### distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
21
|
-
### KIND, either express or implied. See the Apache License for the specific
|
|
22
|
-
### language governing permissions and limitations under the Apache License.
|
|
23
|
-
###
|
|
24
|
-
###
|
|
1
|
+
# Copyright 2025 Pixar
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the terms set forth in the LICENSE.txt file available at
|
|
4
|
+
# at the root of this project.
|
|
25
5
|
|
|
26
6
|
module Jamf
|
|
27
|
-
|
|
28
|
-
# Module for containing the different types of DirectoryBindings stored within the JSS
|
|
29
|
-
module DirectoryBindingType
|
|
30
|
-
|
|
31
|
-
# Module Variables
|
|
32
|
-
#####################################
|
|
33
|
-
|
|
34
|
-
# Module Methods
|
|
35
|
-
#####################################
|
|
36
|
-
|
|
37
|
-
# Classes
|
|
38
|
-
#####################################
|
|
39
|
-
|
|
40
|
-
# Class for the specific Active Directory DirectoryBinding type stored within the JSS
|
|
41
|
-
#
|
|
42
|
-
# @author Tyler Morgan
|
|
43
|
-
#
|
|
44
|
-
# Attributes
|
|
45
|
-
# @!attribute [rw] cache_last_user
|
|
46
|
-
# @!attribute [rw] require_confirmation
|
|
47
|
-
# @!attribute [rw] local_home
|
|
48
|
-
# @!attribute [rw] use_unc_path
|
|
49
|
-
# @!attribute [rw] mount_style
|
|
50
|
-
# @!attribute [rw] default_shell
|
|
51
|
-
# @!attribute [rw] uid
|
|
52
|
-
# @!attribute [rw] user_gid
|
|
53
|
-
# @!attribute [rw] gid
|
|
54
|
-
# @!attribute [rw] multiple_domains
|
|
55
|
-
# @!attribute [rw] preferred_domain
|
|
56
|
-
# @!attribute [rw] admin_groups
|
|
57
|
-
# @!attribute [rw] forest
|
|
58
|
-
# TODO: Include default values upon creation
|
|
59
|
-
|
|
60
|
-
class ActiveDirectory < DirectoryBindingType
|
|
61
|
-
# Mix-Ins
|
|
62
|
-
#####################################
|
|
63
|
-
|
|
64
|
-
# Class Methods
|
|
65
|
-
#####################################
|
|
66
|
-
|
|
67
|
-
# Class Constants
|
|
68
|
-
#####################################
|
|
69
|
-
|
|
70
|
-
# Attributes
|
|
71
|
-
#####################################
|
|
72
|
-
attr_reader :cache_last_user
|
|
73
|
-
attr_reader :require_confirmation
|
|
74
|
-
attr_reader :local_home
|
|
75
|
-
attr_reader :use_unc_path
|
|
76
|
-
attr_reader :mount_style
|
|
77
|
-
attr_reader :default_shell
|
|
78
|
-
attr_reader :uid
|
|
79
|
-
attr_reader :user_gid
|
|
80
|
-
attr_reader :gid
|
|
81
|
-
attr_reader :multiple_domains
|
|
82
|
-
attr_reader :preferred_domain
|
|
83
|
-
attr_reader :admin_groups
|
|
84
|
-
attr_reader :forest
|
|
85
|
-
|
|
86
|
-
# Constructor
|
|
87
|
-
#####################################
|
|
88
|
-
|
|
89
|
-
# An initializer for the Active Directory object.
|
|
90
|
-
#
|
|
91
|
-
# @author Tyler Morgan
|
|
92
|
-
# @see Jamf::DirectoryBinding
|
|
93
|
-
# @see Jamf::DirectoryBindingType
|
|
94
|
-
#
|
|
95
|
-
# @param [Hash] initialize data
|
|
96
|
-
def initialize(init_data)
|
|
97
|
-
|
|
98
|
-
# Return without processing anything since there is
|
|
99
|
-
# nothing to process.
|
|
100
|
-
return if init_data.nil?
|
|
101
|
-
|
|
102
|
-
# Process provided information
|
|
103
|
-
@cache_last_user = init_data[:cache_last_user]
|
|
104
|
-
@require_confirmation = init_data[:require_confirmation]
|
|
105
|
-
@local_home = init_data[:local_home]
|
|
106
|
-
@use_unc_path = init_data[:use_unc_path]
|
|
107
|
-
@default_shell = init_data[:default_shell]
|
|
108
|
-
@uid = init_data[:uid]
|
|
109
|
-
@user_gid = init_data[:user_gid]
|
|
110
|
-
@gid = init_data[:gid]
|
|
111
|
-
@multiple_domains = init_data[:multiple_domains]
|
|
112
|
-
@preferred_domain = init_data[:preferred_domain]
|
|
113
|
-
@forest = init_data[:forest]
|
|
114
|
-
|
|
115
|
-
if init_data[:mount_style].nil? || init_data[:mount_style].is_a?(String)
|
|
116
|
-
raise Jamf::InvalidDataError, "Mount style must be one of #{NETWORK_PROTOCOL.values.join(', ')}." unless NETWORK_PROTOCOL.values.map { |x| x.downcase }.include?(init_data[:mount_style].downcase) || init_data[:mount_style].nil?
|
|
117
|
-
@mount_style = init_data[:mount_style]
|
|
118
|
-
else
|
|
119
|
-
raise Jamf::InvalidDataError, "Mount style must be one of :#{NETWORK_PROTOCOL.keys.join(',:')}," unless NETWORK_PROTOCOL.keys.include? init_data[:mount_style]
|
|
120
|
-
|
|
121
|
-
@mount_style = NETWORK_PROTOCOL[init_data[:mount_style]]
|
|
122
|
-
end
|
|
123
|
-
|
|
124
|
-
if init_data[:admin_groups].nil?
|
|
125
|
-
# This is needed since we have the ability to add and
|
|
126
|
-
# remove admin groups from this array.
|
|
127
|
-
@admin_groups = []
|
|
128
|
-
elsif init_data[:admin_groups].is_a? String
|
|
129
|
-
@admin_groups = init_data[:admin_groups].split(',')
|
|
130
|
-
else
|
|
131
|
-
@admin_groups = init_data[:admin_groups]
|
|
132
|
-
end
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
# Public Instance Methods
|
|
138
|
-
#####################################
|
|
139
|
-
|
|
140
|
-
# Create mobile account upon login
|
|
141
|
-
#
|
|
142
|
-
# @author Tyler Morgan
|
|
143
|
-
#
|
|
144
|
-
# @param newvalue [Bool]
|
|
145
|
-
#
|
|
146
|
-
# @raise [Jamf::InvalidDataError] If the new value doesn't match a Bool value
|
|
147
|
-
#
|
|
148
|
-
# @return [void]
|
|
149
|
-
def cache_last_user=(newvalue)
|
|
150
|
-
|
|
151
|
-
# Data Check
|
|
152
|
-
raise Jamf::InvalidDataError, "cache_last_user must be true or false." unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
|
|
153
|
-
|
|
154
|
-
# Update Value
|
|
155
|
-
@cache_last_user = newvalue
|
|
156
|
-
|
|
157
|
-
# Set the object to needing to be updated.
|
|
158
|
-
self.container&.should_update
|
|
159
|
-
end
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
# Require confirmation before creating a mobile account on the system.
|
|
163
|
-
#
|
|
164
|
-
# @author Tyler Morgan
|
|
165
|
-
#
|
|
166
|
-
# @param newvalue [Bool]
|
|
167
|
-
#
|
|
168
|
-
# @raise [Jamf::InvalidDataError] If the new value doesn't match a Bool value
|
|
169
|
-
#
|
|
170
|
-
# @return [void]
|
|
171
|
-
def require_confirmation=(newvalue)
|
|
172
|
-
|
|
173
|
-
# Data Check
|
|
174
|
-
raise Jamf::InvalidDataError, "require_confirmation must be true or false." unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
|
|
175
|
-
|
|
176
|
-
# Update Value
|
|
177
|
-
@require_confirmation = newvalue
|
|
178
|
-
|
|
179
|
-
# Set the object to needing to be updated.
|
|
180
|
-
self.container&.should_update
|
|
181
|
-
end
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
# Force local home directory to be placed on the startup disk
|
|
185
|
-
#
|
|
186
|
-
# @author Tyler Morgan
|
|
187
|
-
#
|
|
188
|
-
# @param newvalue [Bool]
|
|
189
|
-
#
|
|
190
|
-
# @raise [Jamf::InvalidDataError] If the new value doesn't match a Bool value
|
|
191
|
-
#
|
|
192
|
-
# @return [void]
|
|
193
|
-
def local_home=(newvalue)
|
|
194
|
-
|
|
195
|
-
# Data Check
|
|
196
|
-
raise Jamf::InvalidDataError, "local_home must be true or false." unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
|
|
197
|
-
|
|
198
|
-
# Update Value
|
|
199
|
-
@local_home = newvalue
|
|
200
|
-
|
|
201
|
-
# Set the object to needing to be updated.
|
|
202
|
-
self.container&.should_update
|
|
203
|
-
end
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
# Attempt to derive the network home location using the UNC path stored inside Active Directory
|
|
207
|
-
#
|
|
208
|
-
# @author Tyler Morgan
|
|
209
|
-
#
|
|
210
|
-
# @param newvalue [Bool]
|
|
211
|
-
#
|
|
212
|
-
# @raise [Jamf::InvalidDataError] If the new value doesn't match a Bool value
|
|
213
|
-
#
|
|
214
|
-
# @return [void]
|
|
215
|
-
def use_unc_path=(newvalue)
|
|
216
|
-
|
|
217
|
-
# Data Check
|
|
218
|
-
raise Jamf::InvalidDataError, "use_unc_path must be true or false." unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
|
|
219
|
-
|
|
220
|
-
# Update Value
|
|
221
|
-
@use_unc_path = newvalue
|
|
222
|
-
|
|
223
|
-
# Set the object to needing to be updated.
|
|
224
|
-
self.container&.should_update
|
|
225
|
-
end
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
# The protocol to be use when mounting network home location
|
|
229
|
-
#
|
|
230
|
-
# @author Tyler Morgan
|
|
231
|
-
#
|
|
232
|
-
# @param newvalue [Symbol] One of the keys available in NETWORK_PROTOCOL
|
|
233
|
-
# @see Jamf::DIRECTORYBINDINGTYPE::NETWORK_PROTOCOL
|
|
234
|
-
#
|
|
235
|
-
# @raise [Jamf::InvalidDataError] If the new value provided is not a key inside the NETWORK_PROTOCOL hash.
|
|
236
|
-
#
|
|
237
|
-
# @return [void]
|
|
238
|
-
def mount_style=(newvalue)
|
|
239
|
-
|
|
240
|
-
# Data Check
|
|
241
|
-
raise Jamf::InvalidDataError, "mount_style must be one of :#{NETWORK_PROTOCOL.keys.join(',:')}." unless NETWORK_PROTOCOL.keys.include? newvalue
|
|
242
|
-
|
|
243
|
-
# Update Value
|
|
244
|
-
@mount_style = newvalue
|
|
245
|
-
|
|
246
|
-
# Set the object to needing to be updated.
|
|
247
|
-
self.container&.should_update
|
|
248
|
-
end
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
# The directory path to the shell user's default shell will be set to upon login.
|
|
252
|
-
#
|
|
253
|
-
# @author Tyler Morgan
|
|
254
|
-
#
|
|
255
|
-
# @param newvalue [String] Directory path for the specific shell that is wanting to be set.
|
|
256
|
-
#
|
|
257
|
-
# @raise [Jamf::InvalidDataError] If the new value is not a String
|
|
258
|
-
#
|
|
259
|
-
# @return [void]
|
|
260
|
-
def default_shell=(newvalue)
|
|
261
|
-
|
|
262
|
-
new =
|
|
263
|
-
if newvalue.to_s.empty?
|
|
264
|
-
Jamf::BLANK
|
|
265
|
-
else
|
|
266
|
-
# Data Check
|
|
267
|
-
raise Jamf::InvalidDataError, "default_shell must be a string." unless newvalue.is_a? String
|
|
268
|
-
newvalue
|
|
269
|
-
end
|
|
270
|
-
|
|
271
|
-
# Update Value
|
|
272
|
-
@default_shell = new
|
|
273
|
-
|
|
274
|
-
# Set the object to needing to be updated.
|
|
275
|
-
self.container&.should_update
|
|
276
|
-
end
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
# Map specific a UID to Attribute
|
|
280
|
-
#
|
|
281
|
-
# @author Tyler Morgan
|
|
282
|
-
#
|
|
283
|
-
# @param newvalue [String] The UID you want to be mapped
|
|
284
|
-
#
|
|
285
|
-
# @raise [Jamf::InvalidDataError] If the new value is not a String
|
|
286
|
-
#
|
|
287
|
-
# @return [void]
|
|
288
|
-
def uid=(newvalue)
|
|
289
|
-
new =
|
|
290
|
-
if newvalue.to_s.empty?
|
|
291
|
-
Jamf::BLANK
|
|
292
|
-
else
|
|
293
|
-
# Data Check
|
|
294
|
-
raise Jamf::InvalidDataError, "uid must be either an integer or a string." unless (newvalue.is_a? Integer || newvalue.is_a?(String))
|
|
295
|
-
newvalue
|
|
296
|
-
end
|
|
297
|
-
|
|
298
|
-
# Update Value
|
|
299
|
-
@uid = new
|
|
300
|
-
|
|
301
|
-
# Set the object to needing to be updated.
|
|
302
|
-
self.container&.should_update
|
|
303
|
-
end
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
# Specify a specific forest within Active Directory
|
|
307
|
-
#
|
|
308
|
-
# @author Tyler Morgan
|
|
309
|
-
#
|
|
310
|
-
# @param newvalue [String] The forest you want to specify
|
|
311
|
-
#
|
|
312
|
-
# @raise [Jamf::InvalidDataError] If the new value is not a String
|
|
313
|
-
#
|
|
314
|
-
# @return [void]
|
|
315
|
-
def forest=(newvalue)
|
|
316
|
-
new =
|
|
317
|
-
if newvalue.to_s.empty?
|
|
318
|
-
Jamf::BLANK
|
|
319
|
-
else
|
|
320
|
-
# Data Check
|
|
321
|
-
raise Jamf::InvalidDataError, "forest must be a string." unless newvalue.is_a? String
|
|
322
|
-
newvalue
|
|
323
|
-
end
|
|
324
|
-
|
|
325
|
-
# Update Value
|
|
326
|
-
@forest = new
|
|
327
|
-
|
|
328
|
-
# Set the object to needing to be updated.
|
|
329
|
-
self.container&.should_update
|
|
330
|
-
end
|
|
331
|
-
|
|
332
|
-
# Map specific a User's GID to Attribute
|
|
333
|
-
#
|
|
334
|
-
# @author Tyler Morgan
|
|
335
|
-
#
|
|
336
|
-
# @param newvalue [String] The User's GID you want to be mapped
|
|
337
|
-
#
|
|
338
|
-
# @raise [Jamf::InvalidDataError] If the new value is not a String
|
|
339
|
-
#
|
|
340
|
-
# @return [void]
|
|
341
|
-
def user_gid=(newvalue)
|
|
342
|
-
new =
|
|
343
|
-
if newvalue.to_s.empty?
|
|
344
|
-
Jamf::BLANK
|
|
345
|
-
else
|
|
346
|
-
# Data Check
|
|
347
|
-
raise Jamf::InvalidDataError, "user_gid must be either an integer or a string." unless (newvalue.is_a? Integer || newvalue.is_a?(String))
|
|
348
|
-
newvalue
|
|
349
|
-
end
|
|
350
|
-
|
|
351
|
-
# Update Value
|
|
352
|
-
@user_gid = new
|
|
353
|
-
|
|
354
|
-
# Set the object to needing to be updated.
|
|
355
|
-
self.container&.should_update
|
|
356
|
-
end
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
# Map specific a GID to Attribute
|
|
360
|
-
#
|
|
361
|
-
# @author Tyler Morgan
|
|
362
|
-
#
|
|
363
|
-
# @param newvalue [String] The GID you want to be mapped
|
|
364
|
-
#
|
|
365
|
-
# @raise [Jamf::InvalidDataError] If the new value is not a String
|
|
366
|
-
#
|
|
367
|
-
# @return [void]
|
|
368
|
-
def gid=(newvalue)
|
|
369
|
-
new =
|
|
370
|
-
if newvalue.to_s.empty?
|
|
371
|
-
Jamf::BLANK
|
|
372
|
-
else
|
|
373
|
-
# Data Check
|
|
374
|
-
raise Jamf::InvalidDataError, "gid must be either an integer or a string." unless (newvalue.is_a? Integer || newvalue.is_a?(String))
|
|
375
|
-
newvalue
|
|
376
|
-
end
|
|
377
|
-
|
|
378
|
-
# Update Value
|
|
379
|
-
@gid = new
|
|
380
|
-
|
|
381
|
-
# Set the object to needing to be updated.
|
|
382
|
-
self.container&.should_update
|
|
383
|
-
end
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
# Will this computer be possibly connecting to multiple domains
|
|
387
|
-
#
|
|
388
|
-
# @author Tyler Morgan
|
|
389
|
-
#
|
|
390
|
-
# @param newvalue [Bool]
|
|
391
|
-
#
|
|
392
|
-
# @raise [Jamf::InvalidDataError] If the provided value is not a Bool.
|
|
393
|
-
#
|
|
394
|
-
# @return [void]
|
|
395
|
-
def multiple_domains=(newvalue)
|
|
396
|
-
|
|
397
|
-
# Data Check
|
|
398
|
-
raise Jamf::InvalidDataError, "multiple_domains must be true or false." unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
|
|
399
|
-
|
|
400
|
-
# Update Value
|
|
401
|
-
@multiple_domains = newvalue
|
|
402
|
-
|
|
403
|
-
# Set the object to needing to be updated.
|
|
404
|
-
self.container&.should_update
|
|
405
|
-
end
|
|
406
|
-
|
|
407
7
|
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
8
|
+
# Module for containing the different types of DirectoryBindings stored within the JSS
|
|
9
|
+
module DirectoryBindingType
|
|
10
|
+
|
|
11
|
+
# Module Variables
|
|
12
|
+
#####################################
|
|
13
|
+
|
|
14
|
+
# Module Methods
|
|
15
|
+
#####################################
|
|
16
|
+
|
|
17
|
+
# Classes
|
|
18
|
+
#####################################
|
|
19
|
+
|
|
20
|
+
# Class for the specific Active Directory DirectoryBinding type stored within the JSS
|
|
21
|
+
#
|
|
22
|
+
# @author Tyler Morgan
|
|
23
|
+
#
|
|
24
|
+
# Attributes
|
|
25
|
+
# @!attribute [rw] cache_last_user
|
|
26
|
+
# @!attribute [rw] require_confirmation
|
|
27
|
+
# @!attribute [rw] local_home
|
|
28
|
+
# @!attribute [rw] use_unc_path
|
|
29
|
+
# @!attribute [rw] mount_style
|
|
30
|
+
# @!attribute [rw] default_shell
|
|
31
|
+
# @!attribute [rw] uid
|
|
32
|
+
# @!attribute [rw] user_gid
|
|
33
|
+
# @!attribute [rw] gid
|
|
34
|
+
# @!attribute [rw] multiple_domains
|
|
35
|
+
# @!attribute [rw] preferred_domain
|
|
36
|
+
# @!attribute [rw] admin_groups
|
|
37
|
+
# @!attribute [rw] forest
|
|
38
|
+
# TODO: Include default values upon creation
|
|
39
|
+
|
|
40
|
+
class ActiveDirectory < DirectoryBindingType
|
|
41
|
+
|
|
42
|
+
# Mix-Ins
|
|
43
|
+
#####################################
|
|
44
|
+
|
|
45
|
+
# Class Methods
|
|
46
|
+
#####################################
|
|
47
|
+
|
|
48
|
+
# Class Constants
|
|
49
|
+
#####################################
|
|
50
|
+
|
|
51
|
+
# Attributes
|
|
52
|
+
#####################################
|
|
53
|
+
attr_reader :cache_last_user
|
|
54
|
+
attr_reader :require_confirmation, :local_home, :use_unc_path, :mount_style, :default_shell, :uid, :user_gid, :gid, :multiple_domains,
|
|
55
|
+
:preferred_domain, :admin_groups, :forest
|
|
56
|
+
|
|
57
|
+
# Constructor
|
|
58
|
+
#####################################
|
|
59
|
+
|
|
60
|
+
# An initializer for the Active Directory object.
|
|
61
|
+
#
|
|
62
|
+
# @author Tyler Morgan
|
|
63
|
+
# @see Jamf::DirectoryBinding
|
|
64
|
+
# @see Jamf::DirectoryBindingType
|
|
65
|
+
#
|
|
66
|
+
# @param [Hash] initialize data
|
|
67
|
+
def initialize(init_data)
|
|
68
|
+
# Return without processing anything since there is
|
|
69
|
+
# nothing to process.
|
|
70
|
+
return if init_data.nil?
|
|
71
|
+
|
|
72
|
+
# Process provided information
|
|
73
|
+
@cache_last_user = init_data[:cache_last_user]
|
|
74
|
+
@require_confirmation = init_data[:require_confirmation]
|
|
75
|
+
@local_home = init_data[:local_home]
|
|
76
|
+
@use_unc_path = init_data[:use_unc_path]
|
|
77
|
+
@default_shell = init_data[:default_shell]
|
|
78
|
+
@uid = init_data[:uid]
|
|
79
|
+
@user_gid = init_data[:user_gid]
|
|
80
|
+
@gid = init_data[:gid]
|
|
81
|
+
@multiple_domains = init_data[:multiple_domains]
|
|
82
|
+
@preferred_domain = init_data[:preferred_domain]
|
|
83
|
+
@forest = init_data[:forest]
|
|
84
|
+
|
|
85
|
+
if init_data[:mount_style].nil? || init_data[:mount_style].is_a?(String)
|
|
86
|
+
raise Jamf::InvalidDataError, "Mount style must be one of #{NETWORK_PROTOCOL.values.join(', ')}." unless NETWORK_PROTOCOL.values.map do |x|
|
|
87
|
+
x.downcase
|
|
88
|
+
end.include?(init_data[:mount_style].downcase) || init_data[:mount_style].nil?
|
|
89
|
+
|
|
90
|
+
@mount_style = init_data[:mount_style]
|
|
91
|
+
else
|
|
92
|
+
unless NETWORK_PROTOCOL.keys.include? init_data[:mount_style]
|
|
93
|
+
raise Jamf::InvalidDataError,
|
|
94
|
+
"Mount style must be one of :#{NETWORK_PROTOCOL.keys.join(',:')},"
|
|
95
|
+
end
|
|
96
|
+
|
|
97
|
+
@mount_style = NETWORK_PROTOCOL[init_data[:mount_style]]
|
|
98
|
+
end
|
|
433
99
|
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
#
|
|
441
|
-
# @raise [Jamf::InvalidDataError] If the provided value is not an Array.
|
|
442
|
-
#
|
|
443
|
-
# @return [void]
|
|
444
|
-
def admin_groups=(newvalue)
|
|
445
|
-
new =
|
|
446
|
-
if newvalue.to_s.empty?
|
|
447
|
-
Jamf::BLANK
|
|
448
|
-
else
|
|
449
|
-
# Data Check
|
|
450
|
-
raise Jamf::InvalidDataError, "admin_groups must be either a string or an array of strings." unless (newvalue.is_a? String || newvalue.is_a?(Array))
|
|
451
|
-
|
|
452
|
-
if newvalue.is_a? Array
|
|
453
|
-
newvalue.join ","
|
|
100
|
+
@admin_groups = if init_data[:admin_groups].nil?
|
|
101
|
+
# This is needed since we have the ability to add and
|
|
102
|
+
# remove admin groups from this array.
|
|
103
|
+
[]
|
|
104
|
+
elsif init_data[:admin_groups].is_a? String
|
|
105
|
+
init_data[:admin_groups].split(',')
|
|
454
106
|
else
|
|
455
|
-
|
|
107
|
+
init_data[:admin_groups]
|
|
456
108
|
end
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
# Public Instance Methods
|
|
112
|
+
#####################################
|
|
113
|
+
|
|
114
|
+
# Create mobile account upon login
|
|
115
|
+
#
|
|
116
|
+
# @author Tyler Morgan
|
|
117
|
+
#
|
|
118
|
+
# @param newvalue [Bool]
|
|
119
|
+
#
|
|
120
|
+
# @raise [Jamf::InvalidDataError] If the new value doesn't match a Bool value
|
|
121
|
+
#
|
|
122
|
+
# @return [void]
|
|
123
|
+
def cache_last_user=(newvalue)
|
|
124
|
+
# Data Check
|
|
125
|
+
raise Jamf::InvalidDataError, 'cache_last_user must be true or false.' unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
|
|
126
|
+
|
|
127
|
+
# Update Value
|
|
128
|
+
@cache_last_user = newvalue
|
|
129
|
+
|
|
130
|
+
# Set the object to needing to be updated.
|
|
131
|
+
container&.should_update
|
|
132
|
+
end
|
|
133
|
+
|
|
134
|
+
# Require confirmation before creating a mobile account on the system.
|
|
135
|
+
#
|
|
136
|
+
# @author Tyler Morgan
|
|
137
|
+
#
|
|
138
|
+
# @param newvalue [Bool]
|
|
139
|
+
#
|
|
140
|
+
# @raise [Jamf::InvalidDataError] If the new value doesn't match a Bool value
|
|
141
|
+
#
|
|
142
|
+
# @return [void]
|
|
143
|
+
def require_confirmation=(newvalue)
|
|
144
|
+
# Data Check
|
|
145
|
+
raise Jamf::InvalidDataError, 'require_confirmation must be true or false.' unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
|
|
146
|
+
|
|
147
|
+
# Update Value
|
|
148
|
+
@require_confirmation = newvalue
|
|
149
|
+
|
|
150
|
+
# Set the object to needing to be updated.
|
|
151
|
+
container&.should_update
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
# Force local home directory to be placed on the startup disk
|
|
155
|
+
#
|
|
156
|
+
# @author Tyler Morgan
|
|
157
|
+
#
|
|
158
|
+
# @param newvalue [Bool]
|
|
159
|
+
#
|
|
160
|
+
# @raise [Jamf::InvalidDataError] If the new value doesn't match a Bool value
|
|
161
|
+
#
|
|
162
|
+
# @return [void]
|
|
163
|
+
def local_home=(newvalue)
|
|
164
|
+
# Data Check
|
|
165
|
+
raise Jamf::InvalidDataError, 'local_home must be true or false.' unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
|
|
166
|
+
|
|
167
|
+
# Update Value
|
|
168
|
+
@local_home = newvalue
|
|
169
|
+
|
|
170
|
+
# Set the object to needing to be updated.
|
|
171
|
+
container&.should_update
|
|
172
|
+
end
|
|
173
|
+
|
|
174
|
+
# Attempt to derive the network home location using the UNC path stored inside Active Directory
|
|
175
|
+
#
|
|
176
|
+
# @author Tyler Morgan
|
|
177
|
+
#
|
|
178
|
+
# @param newvalue [Bool]
|
|
179
|
+
#
|
|
180
|
+
# @raise [Jamf::InvalidDataError] If the new value doesn't match a Bool value
|
|
181
|
+
#
|
|
182
|
+
# @return [void]
|
|
183
|
+
def use_unc_path=(newvalue)
|
|
184
|
+
# Data Check
|
|
185
|
+
raise Jamf::InvalidDataError, 'use_unc_path must be true or false.' unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
|
|
186
|
+
|
|
187
|
+
# Update Value
|
|
188
|
+
@use_unc_path = newvalue
|
|
189
|
+
|
|
190
|
+
# Set the object to needing to be updated.
|
|
191
|
+
container&.should_update
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
# The protocol to be use when mounting network home location
|
|
195
|
+
#
|
|
196
|
+
# @author Tyler Morgan
|
|
197
|
+
#
|
|
198
|
+
# @param newvalue [Symbol] One of the keys available in NETWORK_PROTOCOL
|
|
199
|
+
# @see Jamf::DIRECTORYBINDINGTYPE::NETWORK_PROTOCOL
|
|
200
|
+
#
|
|
201
|
+
# @raise [Jamf::InvalidDataError] If the new value provided is not a key inside the NETWORK_PROTOCOL hash.
|
|
202
|
+
#
|
|
203
|
+
# @return [void]
|
|
204
|
+
def mount_style=(newvalue)
|
|
205
|
+
# Data Check
|
|
206
|
+
raise Jamf::InvalidDataError, "mount_style must be one of :#{NETWORK_PROTOCOL.keys.join(',:')}." unless NETWORK_PROTOCOL.keys.include? newvalue
|
|
207
|
+
|
|
208
|
+
# Update Value
|
|
209
|
+
@mount_style = newvalue
|
|
210
|
+
|
|
211
|
+
# Set the object to needing to be updated.
|
|
212
|
+
container&.should_update
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# The directory path to the shell user's default shell will be set to upon login.
|
|
216
|
+
#
|
|
217
|
+
# @author Tyler Morgan
|
|
218
|
+
#
|
|
219
|
+
# @param newvalue [String] Directory path for the specific shell that is wanting to be set.
|
|
220
|
+
#
|
|
221
|
+
# @raise [Jamf::InvalidDataError] If the new value is not a String
|
|
222
|
+
#
|
|
223
|
+
# @return [void]
|
|
224
|
+
def default_shell=(newvalue)
|
|
225
|
+
new =
|
|
226
|
+
if newvalue.to_s.empty?
|
|
227
|
+
Jamf::BLANK
|
|
228
|
+
else
|
|
229
|
+
# Data Check
|
|
230
|
+
raise Jamf::InvalidDataError, 'default_shell must be a string.' unless newvalue.is_a? String
|
|
231
|
+
|
|
232
|
+
newvalue
|
|
233
|
+
end
|
|
234
|
+
|
|
235
|
+
# Update Value
|
|
236
|
+
@default_shell = new
|
|
237
|
+
|
|
238
|
+
# Set the object to needing to be updated.
|
|
239
|
+
container&.should_update
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
# Map specific a UID to Attribute
|
|
243
|
+
#
|
|
244
|
+
# @author Tyler Morgan
|
|
245
|
+
#
|
|
246
|
+
# @param newvalue [String] The UID you want to be mapped
|
|
247
|
+
#
|
|
248
|
+
# @raise [Jamf::InvalidDataError] If the new value is not a String
|
|
249
|
+
#
|
|
250
|
+
# @return [void]
|
|
251
|
+
def uid=(newvalue)
|
|
252
|
+
new =
|
|
253
|
+
if newvalue.to_s.empty?
|
|
254
|
+
Jamf::BLANK
|
|
255
|
+
else
|
|
256
|
+
# Data Check
|
|
257
|
+
raise Jamf::InvalidDataError, 'uid must be either an integer or a string.' unless newvalue.is_a? Integer || newvalue.is_a?(String)
|
|
258
|
+
|
|
259
|
+
newvalue
|
|
260
|
+
end
|
|
261
|
+
|
|
262
|
+
# Update Value
|
|
263
|
+
@uid = new
|
|
264
|
+
|
|
265
|
+
# Set the object to needing to be updated.
|
|
266
|
+
container&.should_update
|
|
267
|
+
end
|
|
268
|
+
|
|
269
|
+
# Specify a specific forest within Active Directory
|
|
270
|
+
#
|
|
271
|
+
# @author Tyler Morgan
|
|
272
|
+
#
|
|
273
|
+
# @param newvalue [String] The forest you want to specify
|
|
274
|
+
#
|
|
275
|
+
# @raise [Jamf::InvalidDataError] If the new value is not a String
|
|
276
|
+
#
|
|
277
|
+
# @return [void]
|
|
278
|
+
def forest=(newvalue)
|
|
279
|
+
new =
|
|
280
|
+
if newvalue.to_s.empty?
|
|
281
|
+
Jamf::BLANK
|
|
282
|
+
else
|
|
283
|
+
# Data Check
|
|
284
|
+
raise Jamf::InvalidDataError, 'forest must be a string.' unless newvalue.is_a? String
|
|
285
|
+
|
|
286
|
+
newvalue
|
|
287
|
+
end
|
|
288
|
+
|
|
289
|
+
# Update Value
|
|
290
|
+
@forest = new
|
|
291
|
+
|
|
292
|
+
# Set the object to needing to be updated.
|
|
293
|
+
container&.should_update
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Map specific a User's GID to Attribute
|
|
297
|
+
#
|
|
298
|
+
# @author Tyler Morgan
|
|
299
|
+
#
|
|
300
|
+
# @param newvalue [String] The User's GID you want to be mapped
|
|
301
|
+
#
|
|
302
|
+
# @raise [Jamf::InvalidDataError] If the new value is not a String
|
|
303
|
+
#
|
|
304
|
+
# @return [void]
|
|
305
|
+
def user_gid=(newvalue)
|
|
306
|
+
new =
|
|
307
|
+
if newvalue.to_s.empty?
|
|
308
|
+
Jamf::BLANK
|
|
309
|
+
else
|
|
310
|
+
# Data Check
|
|
311
|
+
unless newvalue.is_a? Integer || newvalue.is_a?(String)
|
|
312
|
+
raise Jamf::InvalidDataError,
|
|
313
|
+
'user_gid must be either an integer or a string.'
|
|
464
314
|
end
|
|
465
315
|
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
316
|
+
newvalue
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
# Update Value
|
|
320
|
+
@user_gid = new
|
|
321
|
+
|
|
322
|
+
# Set the object to needing to be updated.
|
|
323
|
+
container&.should_update
|
|
324
|
+
end
|
|
325
|
+
|
|
326
|
+
# Map specific a GID to Attribute
|
|
327
|
+
#
|
|
328
|
+
# @author Tyler Morgan
|
|
329
|
+
#
|
|
330
|
+
# @param newvalue [String] The GID you want to be mapped
|
|
331
|
+
#
|
|
332
|
+
# @raise [Jamf::InvalidDataError] If the new value is not a String
|
|
333
|
+
#
|
|
334
|
+
# @return [void]
|
|
335
|
+
def gid=(newvalue)
|
|
336
|
+
new =
|
|
337
|
+
if newvalue.to_s.empty?
|
|
338
|
+
Jamf::BLANK
|
|
339
|
+
else
|
|
340
|
+
# Data Check
|
|
341
|
+
raise Jamf::InvalidDataError, 'gid must be either an integer or a string.' unless newvalue.is_a? Integer || newvalue.is_a?(String)
|
|
342
|
+
|
|
343
|
+
newvalue
|
|
344
|
+
end
|
|
345
|
+
|
|
346
|
+
# Update Value
|
|
347
|
+
@gid = new
|
|
348
|
+
|
|
349
|
+
# Set the object to needing to be updated.
|
|
350
|
+
container&.should_update
|
|
351
|
+
end
|
|
352
|
+
|
|
353
|
+
# Will this computer be possibly connecting to multiple domains
|
|
354
|
+
#
|
|
355
|
+
# @author Tyler Morgan
|
|
356
|
+
#
|
|
357
|
+
# @param newvalue [Bool]
|
|
358
|
+
#
|
|
359
|
+
# @raise [Jamf::InvalidDataError] If the provided value is not a Bool.
|
|
360
|
+
#
|
|
361
|
+
# @return [void]
|
|
362
|
+
def multiple_domains=(newvalue)
|
|
363
|
+
# Data Check
|
|
364
|
+
raise Jamf::InvalidDataError, 'multiple_domains must be true or false.' unless newvalue.is_a?(TrueClass) || newvalue.is_a?(FalseClass)
|
|
365
|
+
|
|
366
|
+
# Update Value
|
|
367
|
+
@multiple_domains = newvalue
|
|
368
|
+
|
|
369
|
+
# Set the object to needing to be updated.
|
|
370
|
+
container&.should_update
|
|
371
|
+
end
|
|
372
|
+
|
|
373
|
+
# What domain server should be highest priority
|
|
374
|
+
#
|
|
375
|
+
# @author Tyler Morgan
|
|
376
|
+
#
|
|
377
|
+
# @param newvalue [String]
|
|
378
|
+
#
|
|
379
|
+
# @raise [Jamf::InvalidDataError] If the provided value is not a String.
|
|
380
|
+
#
|
|
381
|
+
# @return [void]
|
|
382
|
+
def preferred_domain=(newvalue)
|
|
383
|
+
new =
|
|
384
|
+
if newvalue.to_s.empty?
|
|
385
|
+
Jamf::BLANK
|
|
386
|
+
else
|
|
387
|
+
# Data Check
|
|
388
|
+
raise Jamf::InvalidDataError, 'preferred_domain must be a string.' unless newvalue.is_a? String
|
|
389
|
+
|
|
390
|
+
newvalue
|
|
391
|
+
end
|
|
392
|
+
|
|
393
|
+
# Update Value
|
|
394
|
+
@preferred_domain = new
|
|
395
|
+
|
|
396
|
+
# Set the object to needing to be updated.
|
|
397
|
+
container&.should_update
|
|
398
|
+
end
|
|
399
|
+
|
|
400
|
+
# The AD group which can be considered administrators of a device.
|
|
401
|
+
#
|
|
402
|
+
# @author Tyler Morgan
|
|
403
|
+
#
|
|
404
|
+
# @param newvalue [Array <String>]
|
|
405
|
+
#
|
|
406
|
+
# @raise [Jamf::InvalidDataError] If the provided value is not an Array.
|
|
407
|
+
#
|
|
408
|
+
# @return [void]
|
|
409
|
+
def admin_groups=(newvalue)
|
|
410
|
+
new =
|
|
411
|
+
if newvalue.to_s.empty?
|
|
412
|
+
Jamf::BLANK
|
|
413
|
+
else
|
|
414
|
+
# Data Check
|
|
415
|
+
unless newvalue.is_a? String || newvalue.is_a?(Array)
|
|
416
|
+
raise Jamf::InvalidDataError,
|
|
417
|
+
'admin_groups must be either a string or an array of strings.'
|
|
487
418
|
end
|
|
488
419
|
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
#
|
|
494
|
-
# @param newvalue [String] The admin group name you want to remove from the admin groups.
|
|
495
|
-
#
|
|
496
|
-
# @raise [Jamf::InvalidDataError] If the value provided is not a String
|
|
497
|
-
# @raise [Jamf::InvalidDataError] If the group provided is not in the admin_group array
|
|
498
|
-
#
|
|
499
|
-
# @return [Array <String>] An array of all the admin groups currently set.
|
|
500
|
-
def remove_admin_group(value)
|
|
501
|
-
|
|
502
|
-
raise Jamf::InvalidDataError, "Admin group being removed must be a string." unless value.is_a? String
|
|
503
|
-
raise Jamf::InvalidDataError, "Admin group #{value} is not in the current admin group(s)." unless @admin_groups.include? value
|
|
504
|
-
|
|
505
|
-
@admin_groups.delete value
|
|
506
|
-
# Set the object to needing to be updated.
|
|
507
|
-
self.container&.should_update
|
|
508
|
-
|
|
509
|
-
return @admin_groups
|
|
420
|
+
if newvalue.is_a? Array
|
|
421
|
+
newvalue.join ','
|
|
422
|
+
else
|
|
423
|
+
newvalue
|
|
510
424
|
end
|
|
425
|
+
end
|
|
426
|
+
|
|
427
|
+
# Update Value
|
|
428
|
+
@admin_groups = new
|
|
429
|
+
|
|
430
|
+
# Set the object to needing to be updated.
|
|
431
|
+
container&.should_update
|
|
432
|
+
end
|
|
433
|
+
|
|
434
|
+
# Add a specific admin group to the admin_groups
|
|
435
|
+
#
|
|
436
|
+
# @author Tyler Morgan
|
|
437
|
+
#
|
|
438
|
+
# @param newvalue [String] The admin group name you want to add to the admin group list
|
|
439
|
+
#
|
|
440
|
+
# @raise [Jamf::InvalidDataError] If the value provided is not a String
|
|
441
|
+
# @raise [Jamf::InvalidDataError] If the group provided is not in the admin_group array
|
|
442
|
+
#
|
|
443
|
+
# @return [Array <String>] An array of all the admin groups currently set.
|
|
444
|
+
def add_admin_group(value)
|
|
445
|
+
raise Jamf::InvalidDataError, 'Admin group must be a string.' unless value.is_a? String
|
|
446
|
+
raise Jamf::InvalidDataError, "Group \"#{value}\" already is in the admin groups." if @admin_groups.include? value
|
|
447
|
+
|
|
448
|
+
@admin_groups << value
|
|
449
|
+
# Set the object to needing to be updated.
|
|
450
|
+
container&.should_update
|
|
451
|
+
|
|
452
|
+
@admin_groups
|
|
453
|
+
end
|
|
454
|
+
|
|
455
|
+
# Remove a specific admin group from the admin_groups
|
|
456
|
+
#
|
|
457
|
+
# @author Tyler Morgan
|
|
458
|
+
#
|
|
459
|
+
# @param newvalue [String] The admin group name you want to remove from the admin groups.
|
|
460
|
+
#
|
|
461
|
+
# @raise [Jamf::InvalidDataError] If the value provided is not a String
|
|
462
|
+
# @raise [Jamf::InvalidDataError] If the group provided is not in the admin_group array
|
|
463
|
+
#
|
|
464
|
+
# @return [Array <String>] An array of all the admin groups currently set.
|
|
465
|
+
def remove_admin_group(value)
|
|
466
|
+
raise Jamf::InvalidDataError, 'Admin group being removed must be a string.' unless value.is_a? String
|
|
467
|
+
raise Jamf::InvalidDataError, "Admin group #{value} is not in the current admin group(s)." unless @admin_groups.include? value
|
|
468
|
+
|
|
469
|
+
@admin_groups.delete value
|
|
470
|
+
# Set the object to needing to be updated.
|
|
471
|
+
container&.should_update
|
|
472
|
+
|
|
473
|
+
@admin_groups
|
|
474
|
+
end
|
|
475
|
+
|
|
476
|
+
# Return a REXML Element containing the current state of the DirectoryBindingType
|
|
477
|
+
# object for adding into the XML of the container.
|
|
478
|
+
#
|
|
479
|
+
# @author Tyler Morgan
|
|
480
|
+
#
|
|
481
|
+
# @return [REXML::Element]
|
|
482
|
+
def type_setting_xml
|
|
483
|
+
type_setting = REXML::Element.new 'active_directory'
|
|
484
|
+
type_setting.add_element('cache_last_user').text = @cache_last_user
|
|
485
|
+
type_setting.add_element('require_confirmation').text = @require_confirmation
|
|
486
|
+
type_setting.add_element('local_home').text = @local_home
|
|
487
|
+
type_setting.add_element('use_unc_path').text = @use_unc_path
|
|
488
|
+
type_setting.add_element('mount_style').text = @mount_style.downcase
|
|
489
|
+
type_setting.add_element('default_shell').text = @default_shell
|
|
490
|
+
type_setting.add_element('uid').text = @uid
|
|
491
|
+
type_setting.add_element('user_gid').text = @user_gid
|
|
492
|
+
type_setting.add_element('gid').text = @gid
|
|
493
|
+
type_setting.add_element('multiple_domains').text = @multiple_domains
|
|
494
|
+
type_setting.add_element('preferred_domain').text = @preferred_domain
|
|
495
|
+
type_setting.add_element('admin_groups').text = @admin_groups.join(',').to_s unless @admin_groups.nil?
|
|
496
|
+
type_setting.add_element('forest').text = @forest.to_s
|
|
497
|
+
|
|
498
|
+
type_setting
|
|
499
|
+
end
|
|
511
500
|
|
|
512
|
-
|
|
513
|
-
# Return a REXML Element containing the current state of the DirectoryBindingType
|
|
514
|
-
# object for adding into the XML of the container.
|
|
515
|
-
#
|
|
516
|
-
# @author Tyler Morgan
|
|
517
|
-
#
|
|
518
|
-
# @return [REXML::Element]
|
|
519
|
-
def type_setting_xml
|
|
520
|
-
type_setting = REXML::Element.new "active_directory"
|
|
521
|
-
type_setting.add_element("cache_last_user").text = @cache_last_user
|
|
522
|
-
type_setting.add_element("require_confirmation").text = @require_confirmation
|
|
523
|
-
type_setting.add_element("local_home").text = @local_home
|
|
524
|
-
type_setting.add_element("use_unc_path").text = @use_unc_path
|
|
525
|
-
type_setting.add_element("mount_style").text = @mount_style.downcase
|
|
526
|
-
type_setting.add_element("default_shell").text = @default_shell
|
|
527
|
-
type_setting.add_element("uid").text = @uid
|
|
528
|
-
type_setting.add_element("user_gid").text = @user_gid
|
|
529
|
-
type_setting.add_element("gid").text = @gid
|
|
530
|
-
type_setting.add_element("multiple_domains").text = @multiple_domains
|
|
531
|
-
type_setting.add_element("preferred_domain").text = @preferred_domain
|
|
532
|
-
type_setting.add_element("admin_groups").text = @admin_groups.join(',').to_s unless @admin_groups.nil?
|
|
533
|
-
type_setting.add_element("forest").text = @forest.to_s
|
|
534
|
-
|
|
535
|
-
return type_setting
|
|
536
|
-
end
|
|
537
|
-
end
|
|
538
501
|
end
|
|
539
|
-
|
|
502
|
+
|
|
503
|
+
end
|
|
504
|
+
|
|
505
|
+
end
|