Skip to content

Commit

Permalink
Add option to not offer manual enrollment to DEP capable machines. Ev…
Browse files Browse the repository at this point in the history
…er. (#39)
  • Loading branch information
sheagcraig authored Jan 12, 2021
1 parent 01042c0 commit af89b90
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions payload/Library/umad/Resources/umad
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,9 @@ def get_parsed_options():
o.add_option('--logopath',
default='company_logo.png',
help=('Optional: Path to company logo.'))
o.add_option('--disablemanualenrollmentfordep', default=False,
help='Optional: Disable the manual enrollment button for DEP devices',
action='store_true')
o.add_option('--manualenrollmenturl',
default='https://apple.com',
help=('Required: Manual Enrollment URL.'))
Expand Down Expand Up @@ -914,6 +917,14 @@ def main():
umad.views['field.depfailuresubtext'].setStringValue_(
opts.depfailuresubtext)

# If the disablemanualenrollmentfordep option is set, never offer
# manual enrollment as an option for DEP capable devices.
if dep_capable and opts.disablemanualenrollmentfordep:
umad.views['button.manualenrollment'].setHidden_(True)
umad.views['field.manualenrollmenttext'].setHidden_(True)
umad.views['field.depfailuretext'].setHidden_(True)
umad.views['field.depfailuresubtext'].setHidden_(True)

# Do one final MDM check to instantly update the UI for UAMDM
check_mdm_status(True)

Expand Down

0 comments on commit af89b90

Please sign in to comment.