diff --git a/web2py/applications/smc/controllers/admin.py b/web2py/applications/smc/controllers/admin.py index 2f5e6a52..9b2765a4 100644 --- a/web2py/applications/smc/controllers/admin.py +++ b/web2py/applications/smc/controllers/admin.py @@ -44,7 +44,9 @@ def laptop_settings(): rows = db().select(db.my_app_settings.ALL) form = SQLFORM(db.my_app_settings, rows[0], showid=False, - fields=["laptop_admin_user", "laptop_admin_password", "laptop_network_type"]).process() + fields=[ + "laptop_admin_user", "laptop_admin_password", "laptop_network_type", + "laptop_domain_name", "laptop_domain_ou"]).process() if form.accepted: # Saved diff --git a/web2py/applications/smc/controllers/lms.py b/web2py/applications/smc/controllers/lms.py index 822922a7..15c26e3d 100644 --- a/web2py/applications/smc/controllers/lms.py +++ b/web2py/applications/smc/controllers/lms.py @@ -75,6 +75,10 @@ def verify_ope_account_in_smc(): user_name = None laptop_admin_user = "" laptop_admin_password = "" + laptop_network_type = "" + laptop_domain_name = "" + laptop_domain_ou = "" + # Get the student user in question if len(request.args) > 0: @@ -101,14 +105,19 @@ def verify_ope_account_in_smc(): if msg == "Found": # Pull the laptop admin info laptop_admin_user = AppSettings.GetValue("laptop_admin_user", "") + laptop_network_type = AppSettings.GetValue("laptop_network_type", "Standalone") + laptop_domain_name = AppSettings.GetValue("laptop_domain_name", "SBCTC.local") + laptop_domain_ou = AppSettings.GetValue("laptop_domain_ou", "laptopOU.SBCTC.local") # Moved pw to credential area laptop_admin_password = "********" # AppSettings.GetValue("laptop_admin_password", "") + smc_version = get_app_version() return dict(msg=msg, student_full_name=student_full_name, laptop_admin_user=laptop_admin_user, laptop_admin_password=laptop_admin_password, - smc_version=smc_version) + smc_version=smc_version, laptop_network_type=laptop_network_type, + laptop_domain_name=laptop_domain_name, laptop_domain_ou=laptop_domain_ou) # TODO - Setup permission and add facult/admins to credential permission diff --git a/web2py/applications/smc/models/menu.py b/web2py/applications/smc/models/menu.py index 610cac46..7a682a8f 100644 --- a/web2py/applications/smc/models/menu.py +++ b/web2py/applications/smc/models/menu.py @@ -73,7 +73,7 @@ # (T(u'Configure App \u2bc8 ZFS Settings'), False, URL('admin', 'config_zfs_settings')), (T(u'Configure App \u2bc8 Verify Settings'), False, URL('admin', 'config_verify')), (T(u'Configure App \u2bc8 Verify Settings (auto create)'), False, URL('admin', 'config_verify_auto')), - (T(u'Configure App \u2bc8 Laptop Admin Credentials'), False, URL('admin', 'laptop_admin_credentials')), + #(T(u'Configure App \u2bc8 Laptop Admin Credentials'), False, URL('admin', 'laptop_admin_credentials')), (T(u'Configure App \u2bc8 Add LTI Tools to Canvas'), False, URL('lti', 'add_lti_tools_to_canvas')), (T(u'Configure App \u2bc8 Laptop Settings'), False, URL('admin', 'laptop_settings')), # ]), diff --git a/web2py/applications/smc/models/x_app_models.py b/web2py/applications/smc/models/x_app_models.py index 3c40f734..2d981ec0 100644 --- a/web2py/applications/smc/models/x_app_models.py +++ b/web2py/applications/smc/models/x_app_models.py @@ -212,7 +212,10 @@ Field("disable_student_self_change_password", "boolean", default="False"), Field("disable_faculty_self_change_password", "boolean", default="False"), Field("disable_media_auto_play", "boolean", default="True"), - Field("laptop_network_type", "string", default="standalone", requires=IS_IN_SET(["standalone", "domain"])), + Field("laptop_network_type", "string", default="Standalone", requires=IS_IN_SET(["Standalone", "Domain Member"])), + Field("laptop_domain_name", "string", default="SBCTC.local", required=True), + Field("laptop_domain_ou", "string", default="laptopOU.SBCTC.local", required=True), + ) # force defaults for new fields to prevent nulls diff --git a/web2py/applications/smc/models/x_fixtures.py b/web2py/applications/smc/models/x_fixtures.py index 7edd5da7..62f05b1f 100644 --- a/web2py/applications/smc/models/x_fixtures.py +++ b/web2py/applications/smc/models/x_fixtures.py @@ -30,8 +30,10 @@ auth.add_permission(name='credential', group_id=auth.id_group(role='Faculty')) # Make sure we set some defaults for new settings fields so we don't end up with nulls - db(db.my_app_settings.laptop_network_type == None).update(laptop_network_type="standalone") - + db(db.my_app_settings.laptop_network_type == None).update(laptop_network_type="Standalone") + db(db.my_app_settings.laptop_domain_name == None).update(laptop_domain_name="SBCTC.local") + db(db.my_app_settings.laptop_domain_ou == None).update(laptop_domain_ou="laptopOU.SBCTC.local") + db.commit() diff --git a/web2py/applications/smc/views/admin/laptop_settings.html b/web2py/applications/smc/views/admin/laptop_settings.html index 1146c00b..782f134a 100644 --- a/web2py/applications/smc/views/admin/laptop_settings.html +++ b/web2py/applications/smc/views/admin/laptop_settings.html @@ -26,6 +26,17 @@

Laptop Admin Password: The password to use for the admin account
(DO NOT USE YOUR DOMAIN ADMIN PASSWORD!!! CHOOSE AN ALTERNATE PASSWORD!!!) +
+ Laptop Network Type: Choose standalone if using the laptops in a standalone very secure environment with no domain controller. + Use Domain Member if domain group policy should address most of the security settings. +
+
+ Laptop Domain Name: The full domain name that the laptop should be joined to (ignored if using Standalone mode)- laptop should be a member already before credentialing. +
+
+ Laptop Domain OU: The path to the Organizational Unit this laptop should be in when joined to the domain (ignored if using Standalone mode). +
+