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

sync/UI: Add ability to send custom URLs for blocking rules. #1140

Merged
merged 8 commits into from Aug 4, 2023

Conversation

russellhancox
Copy link
Collaborator

This allows a sync server to send a custom_url field along with a rule blocking execution and this will be used as the URL for the "open" button in place of the normally generated URL.

@russellhancox russellhancox added enhancement sync service Issues related to the sync service / protocol rules gui labels Aug 3, 2023
@russellhancox russellhancox added this to the 2023.7 Release milestone Aug 3, 2023
@russellhancox russellhancox force-pushed the sync-custom-url branch 4 times, most recently from aece4dd to b84d19a Compare August 3, 2023 19:49
This allows a sync server to send a `custom_url` field along with a rule
blocking execution and this will be used as the URL for the "open"
button in place of the normally generated URL.
@russellhancox russellhancox marked this pull request as ready for review August 3, 2023 20:16
@russellhancox russellhancox requested a review from a team as a code owner August 3, 2023 20:16
russellhancox and others added 3 commits August 3, 2023 16:46
This allows a sync server to send a `custom_url` field along with a rule
blocking execution and this will be used as the URL for the "open"
button in place of the normally generated URL.

Fixes google#1087
@pmarkowsky
Copy link
Contributor

This implements and fixes #1087.

Expected behavior for the custom_url field is as follows:

custom_url value Behavior
string "null" No open button is shown in the Santa UI
(A valid URL as a string e.g. "http://" Open button is shown and clicking it takes the user to the custom URL
otherwise the default URL is shown Santa behave normally

Copy link
Contributor

@pmarkowsky pmarkowsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I just think we should add an info / warning log if the custom url is somehow malformed since it'll make the button disappear in the dialog.

Source/common/SNTBlockMessage.m Show resolved Hide resolved
Source/common/SNTBlockMessage.m Outdated Show resolved Hide resolved
mlw
mlw previously approved these changes Aug 4, 2023
Source/common/SNTBlockMessage.m Outdated Show resolved Hide resolved
Source/santad/SNTNotificationQueue.h Outdated Show resolved Hide resolved
Copy link
Contributor

@pmarkowsky pmarkowsky left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@russellhancox russellhancox merged commit c118949 into google:main Aug 4, 2023
10 checks passed
@russellhancox russellhancox deleted the sync-custom-url branch August 4, 2023 19:01
@mlw mlw mentioned this pull request Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement gui rules sync service Issues related to the sync service / protocol
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants