Commit 24110e8f authored by Anthony Léonard's avatar Anthony Léonard Committed by Kateryna Kostiuk

ui: remove mechanisms for mandatory password

The password is no longer mandatory when creating an account. It also
means it is not necessary to export or link to one. Password
verification is then removed so choosing one is recommended but not
enforced.

Change-Id: I2b8735fcb3c8d98ed6f85dac70c1eb852d4dae5f
Reviewed-by: Kateryna Kostiuk's avatarKateryna Kostiuk <kateryna.kostiuk@savoirfairelinux.com>
parent d050182d
...@@ -171,7 +171,7 @@ NSInteger const ERROR_REPEAT_MISMATCH = -2; ...@@ -171,7 +171,7 @@ NSInteger const ERROR_REPEAT_MISMATCH = -2;
- (BOOL)isRepeatPasswordValid - (BOOL)isRepeatPasswordValid
{ {
return [self.password isEqualToString:self.repeatPassword]; return [self.password isEqualToString:self.repeatPassword] || ([self.password length] == 0 && [self.repeatPassword length] == 0);
} }
- (BOOL)validateRepeatPassword:(NSError **)error - (BOOL)validateRepeatPassword:(NSError **)error
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11201" systemVersion="16B2553a" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct"> <document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES" customObjectInstantitationMethod="direct">
<dependencies> <dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11201"/> <development version="7000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12121"/>
<capability name="Aspect ratio constraints" minToolsVersion="5.1"/> <capability name="Aspect ratio constraints" minToolsVersion="5.1"/>
</dependencies> </dependencies>
<objects> <objects>
...@@ -24,7 +25,7 @@ ...@@ -24,7 +25,7 @@
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/> <windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/> <windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="196" y="240" width="410" height="161"/> <rect key="contentRect" x="196" y="240" width="410" height="161"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="900"/> <rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
<view key="contentView" id="EiT-Mj-1SZ"> <view key="contentView" id="EiT-Mj-1SZ">
<rect key="frame" x="0.0" y="0.0" width="410" height="161"/> <rect key="frame" x="0.0" y="0.0" width="410" height="161"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
...@@ -32,7 +33,7 @@ ...@@ -32,7 +33,7 @@
<customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ty1-sj-tT6"> <customView hidden="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ty1-sj-tT6">
<rect key="frame" x="15" y="0.0" width="380" height="151"/> <rect key="frame" x="15" y="0.0" width="380" height="151"/>
<subviews> <subviews>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="G1N-th-ZtP"> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" misplaced="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="G1N-th-ZtP">
<rect key="frame" x="-2" y="78" width="384" height="40"/> <rect key="frame" x="-2" y="78" width="384" height="40"/>
<textFieldCell key="cell" controlSize="mini" sendsActionOnEndEditing="YES" alignment="center" placeholderString="error label" id="e7n-Ev-bK7"> <textFieldCell key="cell" controlSize="mini" sendsActionOnEndEditing="YES" alignment="center" placeholderString="error label" id="e7n-Ev-bK7">
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
...@@ -78,7 +79,7 @@ DQ ...@@ -78,7 +79,7 @@ DQ
<action selector="cancelPressed:" target="-2" id="NWs-SH-M68"/> <action selector="cancelPressed:" target="-2" id="NWs-SH-M68"/>
</connections> </connections>
</button> </button>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="M0M-Fg-Znl"> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="M0M-Fg-Znl">
<rect key="frame" x="-2" y="44" width="384" height="107"/> <rect key="frame" x="-2" y="44" width="384" height="107"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="107" id="egH-qZ-wBG"/> <constraint firstAttribute="height" constant="107" id="egH-qZ-wBG"/>
...@@ -117,7 +118,7 @@ DQ ...@@ -117,7 +118,7 @@ DQ
<customView translatesAutoresizingMaskIntoConstraints="NO" id="xUT-yB-g8Q"> <customView translatesAutoresizingMaskIntoConstraints="NO" id="xUT-yB-g8Q">
<rect key="frame" x="15" y="0.0" width="380" height="151"/> <rect key="frame" x="15" y="0.0" width="380" height="151"/>
<subviews> <subviews>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="Bcr-Pl-Fz9"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bcr-Pl-Fz9">
<rect key="frame" x="50" y="68" width="63" height="17"/> <rect key="frame" x="50" y="68" width="63" height="17"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Password" id="vwh-K9-3O9"> <textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Password" id="vwh-K9-3O9">
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
...@@ -125,7 +126,7 @@ DQ ...@@ -125,7 +126,7 @@ DQ
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
</textField> </textField>
<secureTextField verticalHuggingPriority="750" ambiguous="YES" translatesAutoresizingMaskIntoConstraints="NO" id="vej-Z8-dOm"> <secureTextField verticalHuggingPriority="750" ambiguous="YES" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vej-Z8-dOm">
<rect key="frame" x="118" y="65" width="210" height="22"/> <rect key="frame" x="118" y="65" width="210" height="22"/>
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" placeholderString="Password..." drawsBackground="YES" usesSingleLineMode="YES" id="xqz-Uz-hqU"> <secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" placeholderString="Password..." drawsBackground="YES" usesSingleLineMode="YES" id="xqz-Uz-hqU">
<font key="font" metaFont="system"/> <font key="font" metaFont="system"/>
...@@ -148,7 +149,7 @@ DQ ...@@ -148,7 +149,7 @@ DQ
<outlet property="delegate" destination="-2" id="UEj-AI-SPU"/> <outlet property="delegate" destination="-2" id="UEj-AI-SPU"/>
</connections> </connections>
</secureTextField> </secureTextField>
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="YR8-e7-f8B"> <textField horizontalHuggingPriority="251" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YR8-e7-f8B">
<rect key="frame" x="18" y="126" width="231" height="17"/> <rect key="frame" x="18" y="126" width="231" height="17"/>
<constraints> <constraints>
<constraint firstAttribute="width" relation="greaterThanOrEqual" constant="227" id="6Fn-hi-Ji3"/> <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="227" id="6Fn-hi-Ji3"/>
...@@ -170,16 +171,15 @@ DQ ...@@ -170,16 +171,15 @@ DQ
</buttonCell> </buttonCell>
<connections> <connections>
<action selector="completeAction:" target="-2" id="4me-jZ-4mk"/> <action selector="completeAction:" target="-2" id="4me-jZ-4mk"/>
<binding destination="-2" name="enabled" keyPath="self.password.length" id="KN4-nF-wwM"/>
</connections> </connections>
</button> </button>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" translatesAutoresizingMaskIntoConstraints="NO" id="Qx0-KE-jEl"> <textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" allowsCharacterPickerTouchBarItem="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Qx0-KE-jEl">
<rect key="frame" x="18" y="104" width="344" height="14"/> <rect key="frame" x="18" y="104" width="344" height="14"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="14" id="g34-vr-Zas"/> <constraint firstAttribute="height" constant="14" id="g34-vr-Zas"/>
</constraints> </constraints>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="justified" title="Please provide your Ring account password to start" id="859-10-HEb"> <textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="justified" title="Please provide your Ring account password to start" id="859-10-HEb">
<font key="font" metaFont="system" size="11"/> <font key="font" metaFont="smallSystem"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/> <color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/> <color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell> </textFieldCell>
......
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment