ELECTRON-993: add pod url validation for installers (#569)

* ELECTRON-993: add pod url validation for macOS

- change default url to https://[POD].symphony.com
- validate the above default url to ensure user enters the right url
- remove deprecated code
- add tool tip for the pod url text box

* ELECTRON-993: add pod url validation for windows installers
This commit is contained in:
Vishwas Shashidhar 2019-02-13 18:16:39 +05:30 committed by GitHub
parent c9c38605c5
commit 64b62e975f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 39 additions and 26 deletions

View File

@ -3,7 +3,7 @@
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>17G4015</string>
<string>18D109</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleExecutable</key>
@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.0</string>
<string>4.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>

View File

@ -6,7 +6,7 @@
<dict>
<key>Resources/Base.lproj/MyInstallerPane.nib</key>
<data>
h6775LTCbH4GS52ODzPilHTzBos=
0rfQ2R1TtL98oNUNRVtEU8xVL7E=
</data>
<key>Resources/InstallerSections.plist</key>
<data>
@ -37,11 +37,11 @@
<dict>
<key>hash</key>
<data>
h6775LTCbH4GS52ODzPilHTzBos=
0rfQ2R1TtL98oNUNRVtEU8xVL7E=
</data>
<key>hash2</key>
<data>
GrfIStoQUspnp1KqGRB6bVYZOJWnYrjPoM5nNQFX8f0=
zkN0k8vMtcN/J36Zw9mvTd3iMIdVWrJgzvPr5xvwnb4=
</data>
</dict>
<key>Resources/InstallerSections.plist</key>

View File

@ -97,7 +97,7 @@
TargetAttributes = {
3A10EBCE1ED4336D0083702F = {
CreatedOnToolsVersion = 8.3.2;
DevelopmentTeam = BUX8SV4LQA;
DevelopmentTeam = 7S74264P3V;
ProvisioningStyle = Automatic;
};
};
@ -283,10 +283,10 @@
buildSettings = {
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = BUX8SV4LQA;
DEVELOPMENT_TEAM = 7S74264P3V;
INFOPLIST_FILE = SymphonySettingsPlugin/Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
MACOSX_DEPLOYMENT_TARGET = 10.7;
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = com.symphony.SymphonySettingsPlugin;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -299,10 +299,10 @@
buildSettings = {
CODE_SIGN_IDENTITY = "Mac Developer";
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = BUX8SV4LQA;
DEVELOPMENT_TEAM = 7S74264P3V;
INFOPLIST_FILE = SymphonySettingsPlugin/Info.plist;
INSTALL_PATH = "$(HOME)/Library/Bundles";
MACOSX_DEPLOYMENT_TARGET = 10.7;
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = com.symphony.SymphonySettingsPlugin;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";

View File

@ -52,7 +52,7 @@
<textField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bt3-SN-uKp">
<rect key="frame" x="152" y="278" width="201" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" title="https://my.symphony.com" drawsBackground="YES" usesSingleLineMode="YES" id="4WS-yY-IPf">
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" state="on" borderStyle="bezel" title="https://[POD].symphony.com" drawsBackground="YES" usesSingleLineMode="YES" id="4WS-yY-IPf">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>

View File

@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>BNDL</string>
<key>CFBundleShortVersionString</key>
<string>2.0</string>
<string>4.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<key>InstallerSectionTitle</key>

View File

@ -16,7 +16,10 @@
- (void)willEnterPane:(InstallerSectionDirection)dir {
// By default, set the value of the error message textbox to an empty string
[_podUrlAlertTextBox setTitleWithMnemonic:@""];
_podUrlAlertTextBox.stringValue = @"";
[_podUrlTextBox setToolTip:@"Enter pod url in the format \"https://corporate.symphony.com\""];
[_ssoCheckBox setToolTip:@"Only check this option if your Symphony POD has been configured for SSO, in doubt do not check - contact your Symphony Admin"];
}
- (BOOL)shouldExitPane:(InstallerSectionDirection)dir {
@ -29,17 +32,28 @@
NSPredicate *podUrlTest = [NSPredicate predicateWithFormat:@"SELF MATCHES %@", regex];
if (![podUrlTest evaluateWithObject:podUrl]) {
[_podUrlAlertTextBox setTitleWithMnemonic:@"Please enter a valid Pod url."];
_podUrlAlertTextBox.stringValue = @"Please enter a valid Pod url.";
return NO;
}
if ([podUrl rangeOfString:@"[POD]"].location != NSNotFound) {
_podUrlAlertTextBox.stringValue = @"Please enter a valid Pod url.";
return NO;
}
// Double confirmation for disabling media
if ([_mediaCheckBox state] == 0) {
NSAlert *alert = [NSAlert alertWithMessageText: @"Are you sure you wish to disable the camera, microphone, and speakers?" defaultButton:@"No" alternateButton:@"Yes" otherButton:nil informativeTextWithFormat:@""];
NSAlert *alert = [[NSAlert alloc] init];
[alert setMessageText: @"Are you sure you wish to disable the camera, microphone, and speakers?"];
[alert setInformativeText:@"Once disabled, users won't be able to participate in RTC calls effectively"];
[alert addButtonWithTitle:@"No"];
[alert addButtonWithTitle:@"Yes"];
[alert setAlertStyle:NSWarningAlertStyle];
NSInteger button = [alert runModal];
if (button == NSAlertDefaultReturn) {
if (button == NSAlertFirstButtonReturn) {
return NO;
}
@ -173,8 +187,7 @@
podUrl = [podUrl substringToIndex:podUrl.length - ssoUrl.length];
[_podUrlTextBox setStringValue:podUrl];
}
[_ssoCheckBox setToolTip:@"Only check this option if your Symphony POD has been configured for SSO, in doubt do not check - contact your Symphony Admin"];
}
@end

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long