Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added alternative 3rd paragraph for manual enrollment #29

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ Configure the Manual Enrollment button with a custom URL.
<string>https://apple.com</string>
```

### Manual enrollment paragraph 3 text
This is the text for the third paragraph on the manual enrollment UI.
```xml
<string>--manualenrollparagraph3</string>
<string>To enroll, download the profile using the button below, and click Install. Once prompted, log in with your username and password.</string>
```

### More info URL
When you see the Manual Enrollment button, you can customize a URL directing the users to more information.
```xml
Expand Down Expand Up @@ -195,7 +202,7 @@ This is the text for the second paragraph. 160 character limit.
<string>To enroll, just look for the below notification, and click Details. Once prompted, log in with your username and password.</string>
```

### Paragraph 2 text
### Paragraph 3 text
This is the text for the third paragraph. 160 character limit.
```xml
<string>--paragraph3</string>
Expand Down
9 changes: 9 additions & 0 deletions payload/Library/Application Support/umad/Resources/umad
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ def get_parsed_options():
o.add_option('--manualenrollh2text',
default='Click on the Manual Enrollment button below.',
help=('Optional: Manual enrollment text.'))
o.add_option('--manualenrollparagraph3',
default='To enroll, download the profile using the button '
'below, and click Install. Once prompted, log in with '
'your username and password.',
help=('Required: Manual enrollment paragraph 3 text.'))
o.add_option('--moreinfourl',
default='https://google.com',
help=('Required: More info URL.'))
Expand Down Expand Up @@ -777,6 +782,8 @@ def main():
umad.views['button.understand'].setHidden_(True)

# Show the manual enrollment UI for emergency purposes
umad.views['field.paragraph3'].setStringValue_(
opts.manualenrollparagraph3.decode('utf8'))
umad.views['button.manualenrollment'].setHidden_(False)
umad.views['field.manualenrollmenttext'].setHidden_(False)
umad.views['image.nagscreen'].setHidden_(True)
Expand Down Expand Up @@ -896,6 +903,8 @@ def main():
# Also if admin always wants the break glass option
# Also enable if dep nag didn't actually pop-up
if (not dep_capable and mdm_profile_set) or opts.enableenrollmentbutton or not nag_triggered:
umad.views['field.paragraph3'].setStringValue_(
opts.manualenrollparagraph3.decode('utf8'))
umad.views['button.manualenrollment'].setHidden_(False)
umad.views['field.manualenrollmenttext'].setHidden_(False)
umad.views['image.nagscreen'].setHidden_(True)
Expand Down
2 changes: 2 additions & 0 deletions payload/Library/LaunchAgents/com.erikng.umad.plist
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@
<!--<string>Want this box to go away?</string> -->
<!--<string>--manualenrollh2text</string> -->
<!--<string>Click on the Manual Enrollment button below.</string> -->
<!--<string>--manualenrollparagraph3</string> -->
<!--<string>To enroll, download the profile using the button below, and click Install. Once prompted, log in with your username and password.</string> -->
<!--<string>--paragraph1</string> -->
<!--<string>Enrollment into MDM is required to ensure that IT can protect your computer with basic security necessities like encryption and threat detection.</string> -->
<!--<string>--paragraph2</string> -->
Expand Down