Merge ~jibel/ubiquity:active_directory into ubiquity:master
- Git
- lp:~jibel/ubiquity
- active_directory
- Merge into master
Status: | Merged | ||||
---|---|---|---|---|---|
Merged at revision: | b153322202eba093b3a0b5d96ef3731a373e682a | ||||
Proposed branch: | ~jibel/ubiquity:active_directory | ||||
Merge into: | ubiquity:master | ||||
Diff against target: |
1436 lines (+849/-274) 8 files modified
debian/changelog (+8/-0) debian/ubiquity.templates (+81/-1) gui/gtk/stepUserInfo.ui (+532/-269) scripts/plugininstall.py (+70/-0) tests/test_usersetup.py (+1/-0) ubiquity/components/plugininstall.py (+2/-0) ubiquity/frontend/gtk_ui.py (+9/-1) ubiquity/plugins/ubi-usersetup.py (+146/-3) |
||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthew Paul Thomas (community) | design | Needs Fixing | |
Iain Lane | Approve | ||
Review via email:
|
Commit message
Support for Active directory to the GTK UI.
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Jean-Baptiste Lallement (jibel) wrote : | # |
@Laney, thanks for the review.
Here is the design review https:/
The comments from mpt have all been addressed.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Jean-Baptiste Lallement (jibel) : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Jean-Baptiste Lallement (jibel) wrote : | # |
Branch as been updated.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Iain Lane (laney) wrote : | # |
Looks ok to me, thanks for the updates.
I'll email mpt to give a design 'approve', should be a quick job given it's already been through review.
One thing though, can you please get seb128 to check all the translations are ok here? It's weird/difficult with ubiquity and Seb's helped me fix things there before.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Iain Lane (laney) wrote : | # |
I saw this got merged without the two things I requested, but I would still appreciate them happening.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Matthew Paul Thomas (mpt) wrote : | # |
Thanks for working on the design changes I requested:
❓ Move the Active Directory checkbox down so that it doesn’t look like part of the password group: commented as “Done”, but not shown in the screenshot.
✔ Add an explanatory caption below the checkbox label: Done.
✘ Move the “Test” button to the right of the field to better explain what it was for: Done, but unfortunately at the same time it was renamed to “Test connection”. Ubuntu buttons use Title Case, so this should be either “Test”, or “Test Connection” with a capital C.
✘ If connection fails, tell people to visit ubuntu.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Iain Lane (laney) wrote : | # |
Thanks mpt.
For me it's OK to follow up on those requests with a separate upload, if you'd prefer to do that, so that the stuff we have now can get out there for testing.
Same with the translations, given Seb is not around right now.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Jean-Baptiste Lallement (jibel) wrote : | # |
@mpt, thanks for your comment.
1. The AD checkbox has been moved outside of the GtkBox containing the 2 radio buttons. It follows the same space than other pages. padding of 6px for the alignment that contains it, no margin for the widget. However, I added a margin of 6px between the group of radio buttons and the checkbox to make the separation clearer.
3. Fixed.
4. Fixed.
The gdoc has been updated.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Jean-Baptiste Lallement (jibel) wrote : | # |
PR https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Jean-Baptiste Lallement (jibel) wrote : | # |
submitted https:/
Preview Diff
1 | diff --git a/debian/changelog b/debian/changelog | |||
2 | index 286dc17..739798c 100644 | |||
3 | --- a/debian/changelog | |||
4 | +++ b/debian/changelog | |||
5 | @@ -1,3 +1,11 @@ | |||
6 | 1 | ubiquity (20.10.10) UNRELEASED; urgency=medium | ||
7 | 2 | |||
8 | 3 | [ Didier Roche ] | ||
9 | 4 | [ Jean-Baptiste Lallement ] | ||
10 | 5 | * AD integration for GTK UI. | ||
11 | 6 | |||
12 | 7 | -- Jean-Baptiste Lallement <jean-baptiste.lallement@ubuntu.com> Tue, 25 Aug 2020 10:06:29 +0200 | ||
13 | 8 | |||
14 | 1 | ubiquity (20.10.9) groovy; urgency=medium | 9 | ubiquity (20.10.9) groovy; urgency=medium |
15 | 2 | 10 | ||
16 | 3 | * gtk_ui, prepare: Run 'apt update' before installing OEM metapackages. We | 11 | * gtk_ui, prepare: Run 'apt update' before installing OEM metapackages. We |
17 | diff --git a/debian/ubiquity.templates b/debian/ubiquity.templates | |||
18 | index 89a32e1..eb6d724 100644 | |||
19 | --- a/debian/ubiquity.templates | |||
20 | +++ b/debian/ubiquity.templates | |||
21 | @@ -656,6 +656,10 @@ Template: ubiquity/install/bootloader | |||
22 | 656 | Type: text | 656 | Type: text |
23 | 657 | _Description: Configuring boot loader... | 657 | _Description: Configuring boot loader... |
24 | 658 | 658 | ||
25 | 659 | Template: ubiquity/install/activedirectory | ||
26 | 660 | Type: text | ||
27 | 661 | _Description: Configuring Active Directory... | ||
28 | 662 | |||
29 | 659 | Template: ubiquity/install/apt_clone_save | 663 | Template: ubiquity/install/apt_clone_save |
30 | 660 | Type: text | 664 | Type: text |
31 | 661 | _Description: Saving installed packages... | 665 | _Description: Saving installed packages... |
32 | @@ -770,6 +774,14 @@ _Description: Error restoring installed applications | |||
33 | 770 | installation will continue, but you may have to manually reinstall some | 774 | installation will continue, but you may have to manually reinstall some |
34 | 771 | applications after the computer reboots. | 775 | applications after the computer reboots. |
35 | 772 | 776 | ||
36 | 777 | Template: ubiquity/install/broken_active_directory | ||
37 | 778 | Type: error | ||
38 | 779 | _Description: Error configuring connection to Active Directory | ||
39 | 780 | Sorry, Active Directory can't be set up at the moment. Once your system is up | ||
40 | 781 | and running, visit | ||
41 | 782 | <a href="https://discourse.ubuntu.com/t/service-sssd/11579">ubuntu.com/activedirectory</a> | ||
42 | 783 | for help. | ||
43 | 784 | |||
44 | 773 | Template: ubiquity/install/md5_check | 785 | Template: ubiquity/install/md5_check |
45 | 774 | Type: boolean | 786 | Type: boolean |
46 | 775 | Default: true | 787 | Default: true |
47 | @@ -1637,4 +1649,72 @@ _Description: | |||
48 | 1637 | 1649 | ||
49 | 1638 | Template: ubiquity/zfs_keystore_key | 1650 | Template: ubiquity/zfs_keystore_key |
50 | 1639 | Type: password | 1651 | Type: password |
51 | 1640 | _Description: Key to secure the keystore on ZFS installations | ||
52 | 1641 | \ No newline at end of file | 1652 | \ No newline at end of file |
53 | 1653 | _Description: Key to secure the keystore on ZFS installations | ||
54 | 1654 | |||
55 | 1655 | Template: ubiquity/login_use_directory | ||
56 | 1656 | Type: text | ||
57 | 1657 | _Description: Authenticate against a directory | ||
58 | 1658 | |||
59 | 1659 | Template: ubiquity/directory_domain | ||
60 | 1660 | Type: text | ||
61 | 1661 | _Description: Active Directory domain name | ||
62 | 1662 | |||
63 | 1663 | Template: ubiquity/directory_user | ||
64 | 1664 | Type: text | ||
65 | 1665 | _Description: Administrator to join the domain | ||
66 | 1666 | |||
67 | 1667 | Template: ubiquity/directory_passwd | ||
68 | 1668 | Type: password | ||
69 | 1669 | _Description: Administrator password to join the domain | ||
70 | 1670 | |||
71 | 1671 | Template: ubiquity/text/login_directory | ||
72 | 1672 | Type: text | ||
73 | 1673 | _Description: | ||
74 | 1674 | Use Active Directory | ||
75 | 1675 | |||
76 | 1676 | Template: ubiquity/text/login_directory_extra_label | ||
77 | 1677 | Type: text | ||
78 | 1678 | _Description: | ||
79 | 1679 | You'll enter domain and other details in the next step. | ||
80 | 1680 | |||
81 | 1681 | Template: ubiquity/text/domain_label | ||
82 | 1682 | Type: text | ||
83 | 1683 | _Description: | ||
84 | 1684 | Domain: | ||
85 | 1685 | |||
86 | 1686 | Template: ubiquity/text/domain_name_error_label | ||
87 | 1687 | Type: text | ||
88 | 1688 | _Description: | ||
89 | 1689 | You must enter a domain name | ||
90 | 1690 | |||
91 | 1691 | Template: ubiquity/text/directory_testbutton | ||
92 | 1692 | Type: text | ||
93 | 1693 | _Description: | ||
94 | 1694 | Test connection | ||
95 | 1695 | |||
96 | 1696 | Template: ubiquity/text/domain_user_label | ||
97 | 1697 | Type: text | ||
98 | 1698 | _Description: | ||
99 | 1699 | Domain Administrator: | ||
100 | 1700 | |||
101 | 1701 | Template: ubiquity/text/domain_user_error_label | ||
102 | 1702 | Type: text | ||
103 | 1703 | _Description: | ||
104 | 1704 | You must enter a user name | ||
105 | 1705 | |||
106 | 1706 | Template: ubiquity/text/domain_passwd_label | ||
107 | 1707 | Type: text | ||
108 | 1708 | _Description: | ||
109 | 1709 | Password: | ||
110 | 1710 | |||
111 | 1711 | Template: ubiquity/text/directory_information_title | ||
112 | 1712 | Type: text | ||
113 | 1713 | _Description: Configure Active Directory | ||
114 | 1714 | |||
115 | 1715 | Template: ubiquity/text/hostname_error | ||
116 | 1716 | Type: text | ||
117 | 1717 | _Description: That name already exists on the network. | ||
118 | 1718 | |||
119 | 1719 | Template: ubiquity/text/domain_connection_error | ||
120 | 1720 | Type: text | ||
121 | 1721 | _Description: Failed to connect to domain. | ||
122 | diff --git a/gui/gtk/stepUserInfo.ui b/gui/gtk/stepUserInfo.ui | |||
123 | index 9d64ed2..1eee3ad 100644 | |||
124 | --- a/gui/gtk/stepUserInfo.ui | |||
125 | +++ b/gui/gtk/stepUserInfo.ui | |||
126 | @@ -1,6 +1,7 @@ | |||
127 | 1 | <?xml version="1.0" encoding="UTF-8"?> | 1 | <?xml version="1.0" encoding="UTF-8"?> |
128 | 2 | <!-- Generated with glade 3.22.2 --> | ||
129 | 2 | <interface> | 3 | <interface> |
131 | 3 | <requires lib="gtk+" version="2.16"/> | 4 | <requires lib="gtk+" version="3.20"/> |
132 | 4 | <object class="GtkBox" id="stepUserInfo"> | 5 | <object class="GtkBox" id="stepUserInfo"> |
133 | 5 | <property name="visible">True</property> | 6 | <property name="visible">True</property> |
134 | 6 | <property name="can_focus">False</property> | 7 | <property name="can_focus">False</property> |
135 | @@ -19,344 +20,514 @@ | |||
136 | 19 | </packing> | 20 | </packing> |
137 | 20 | </child> | 21 | </child> |
138 | 21 | <child> | 22 | <child> |
140 | 22 | <object class="GtkGrid" id="userinfo_table"> | 23 | <object class="GtkNotebook" id="userinfo_notebook"> |
141 | 23 | <property name="visible">True</property> | 24 | <property name="visible">True</property> |
193 | 24 | <property name="can_focus">False</property> | 25 | <property name="can_focus">True</property> |
194 | 25 | <property name="border_width">20</property> | 26 | <property name="show_tabs">False</property> |
195 | 26 | <property name="column_spacing">6</property> | 27 | <property name="show_border">False</property> |
145 | 27 | <property name="row_spacing">6</property> | ||
146 | 28 | <child> | ||
147 | 29 | <object class="GtkLabel" id="fullname_label"> | ||
148 | 30 | <property name="visible">True</property> | ||
149 | 31 | <property name="can_focus">False</property> | ||
150 | 32 | <property name="xalign">1</property> | ||
151 | 33 | <property name="label" translatable="yes">Your name:</property> | ||
152 | 34 | </object> | ||
153 | 35 | </child> | ||
154 | 36 | <child> | ||
155 | 37 | <object class="GtkLabel" id="username_label"> | ||
156 | 38 | <property name="visible">True</property> | ||
157 | 39 | <property name="can_focus">False</property> | ||
158 | 40 | <property name="xalign">1</property> | ||
159 | 41 | <property name="label" translatable="yes">Pick a username:</property> | ||
160 | 42 | <property name="justify">right</property> | ||
161 | 43 | </object> | ||
162 | 44 | <packing> | ||
163 | 45 | <property name="left_attach">0</property> | ||
164 | 46 | <property name="top_attach">2</property> | ||
165 | 47 | </packing> | ||
166 | 48 | </child> | ||
167 | 49 | <child> | ||
168 | 50 | <object class="GtkLabel" id="password_label"> | ||
169 | 51 | <property name="visible">True</property> | ||
170 | 52 | <property name="can_focus">False</property> | ||
171 | 53 | <property name="xalign">1</property> | ||
172 | 54 | <property name="label" translatable="yes">Choose a password:</property> | ||
173 | 55 | <property name="justify">right</property> | ||
174 | 56 | </object> | ||
175 | 57 | <packing> | ||
176 | 58 | <property name="left_attach">0</property> | ||
177 | 59 | <property name="top_attach">3</property> | ||
178 | 60 | </packing> | ||
179 | 61 | </child> | ||
180 | 62 | <child> | ||
181 | 63 | <object class="GtkLabel" id="verified_password_label"> | ||
182 | 64 | <property name="visible">True</property> | ||
183 | 65 | <property name="can_focus">False</property> | ||
184 | 66 | <property name="xalign">1</property> | ||
185 | 67 | <property name="label" translatable="yes">Confirm your password:</property> | ||
186 | 68 | <property name="justify">right</property> | ||
187 | 69 | </object> | ||
188 | 70 | <packing> | ||
189 | 71 | <property name="left_attach">0</property> | ||
190 | 72 | <property name="top_attach">4</property> | ||
191 | 73 | </packing> | ||
192 | 74 | </child> | ||
196 | 75 | <child> | 28 | <child> |
198 | 76 | <object class="GtkBox" id="login_vbox"> | 29 | <object class="GtkGrid" id="userinfo_table"> |
199 | 77 | <property name="visible">True</property> | 30 | <property name="visible">True</property> |
200 | 78 | <property name="can_focus">False</property> | 31 | <property name="can_focus">False</property> |
203 | 79 | <property name="orientation">vertical</property> | 32 | <property name="border_width">20</property> |
204 | 80 | <property name="spacing">3</property> | 33 | <property name="row_spacing">6</property> |
205 | 34 | <property name="column_spacing">6</property> | ||
206 | 81 | <child> | 35 | <child> |
209 | 82 | <object class="GtkRadioButton" id="login_auto"> | 36 | <object class="GtkLabel" id="fullname_label"> |
208 | 83 | <property name="label" translatable="yes">Log in automatically</property> | ||
210 | 84 | <property name="visible">True</property> | 37 | <property name="visible">True</property> |
217 | 85 | <property name="can_focus">True</property> | 38 | <property name="can_focus">False</property> |
218 | 86 | <property name="receives_default">False</property> | 39 | <property name="label" translatable="yes">Your name:</property> |
219 | 87 | <property name="use_action_appearance">False</property> | 40 | <property name="xalign">1</property> |
214 | 88 | <property name="xalign">0</property> | ||
215 | 89 | <property name="draw_indicator">True</property> | ||
216 | 90 | <property name="group">login_pass</property> | ||
220 | 91 | </object> | 41 | </object> |
221 | 92 | <packing> | 42 | <packing> |
225 | 93 | <property name="expand">False</property> | 43 | <property name="left_attach">0</property> |
226 | 94 | <property name="fill">False</property> | 44 | <property name="top_attach">0</property> |
224 | 95 | <property name="position">0</property> | ||
227 | 96 | </packing> | 45 | </packing> |
228 | 97 | </child> | 46 | </child> |
229 | 98 | <child> | 47 | <child> |
232 | 99 | <object class="GtkRadioButton" id="login_pass"> | 48 | <object class="GtkLabel" id="username_label"> |
231 | 100 | <property name="label" translatable="yes">Require my password to log in</property> | ||
233 | 101 | <property name="visible">True</property> | 49 | <property name="visible">True</property> |
240 | 102 | <property name="can_focus">True</property> | 50 | <property name="can_focus">False</property> |
241 | 103 | <property name="receives_default">False</property> | 51 | <property name="label" translatable="yes">Pick a username:</property> |
242 | 104 | <property name="use_action_appearance">False</property> | 52 | <property name="justify">right</property> |
243 | 105 | <property name="xalign">0</property> | 53 | <property name="xalign">1</property> |
238 | 106 | <property name="active">True</property> | ||
239 | 107 | <property name="draw_indicator">True</property> | ||
244 | 108 | </object> | 54 | </object> |
245 | 109 | <packing> | 55 | <packing> |
249 | 110 | <property name="expand">False</property> | 56 | <property name="left_attach">0</property> |
250 | 111 | <property name="fill">False</property> | 57 | <property name="top_attach">2</property> |
248 | 112 | <property name="position">1</property> | ||
251 | 113 | </packing> | 58 | </packing> |
252 | 114 | </child> | 59 | </child> |
253 | 115 | </object> | ||
254 | 116 | <packing> | ||
255 | 117 | <property name="left_attach">1</property> | ||
256 | 118 | <property name="top_attach">5</property> | ||
257 | 119 | </packing> | ||
258 | 120 | </child> | ||
259 | 121 | <child> | ||
260 | 122 | <object class="GtkBox" id="hbox1"> | ||
261 | 123 | <property name="visible">True</property> | ||
262 | 124 | <property name="can_focus">False</property> | ||
263 | 125 | <property name="spacing">6</property> | ||
264 | 126 | <child> | 60 | <child> |
266 | 127 | <object class="GtkEntry" id="password"> | 61 | <object class="GtkLabel" id="password_label"> |
267 | 128 | <property name="visible">True</property> | 62 | <property name="visible">True</property> |
278 | 129 | <property name="can_focus">True</property> | 63 | <property name="can_focus">False</property> |
279 | 130 | <property name="visibility">False</property> | 64 | <property name="label" translatable="yes">Choose a password:</property> |
280 | 131 | <property name="invisible_char">●</property> | 65 | <property name="justify">right</property> |
281 | 132 | <property name="activates_default">True</property> | 66 | <property name="xalign">1</property> |
272 | 133 | <property name="width_chars">20</property> | ||
273 | 134 | <property name="invisible_char_set">True</property> | ||
274 | 135 | <accessibility> | ||
275 | 136 | <relation type="labelled-by" target="password_label"/> | ||
276 | 137 | </accessibility> | ||
277 | 138 | <signal name="changed" handler="info_loop" swapped="no"/> | ||
282 | 139 | </object> | 67 | </object> |
283 | 140 | <packing> | 68 | <packing> |
287 | 141 | <property name="expand">False</property> | 69 | <property name="left_attach">0</property> |
288 | 142 | <property name="fill">False</property> | 70 | <property name="top_attach">3</property> |
286 | 143 | <property name="position">0</property> | ||
289 | 144 | </packing> | 71 | </packing> |
290 | 145 | </child> | 72 | </child> |
291 | 146 | <child> | 73 | <child> |
293 | 147 | <object class="GtkLabel" id="password_strength"> | 74 | <object class="GtkLabel" id="verified_password_label"> |
294 | 75 | <property name="visible">True</property> | ||
295 | 148 | <property name="can_focus">False</property> | 76 | <property name="can_focus">False</property> |
299 | 149 | <property name="xalign">0</property> | 77 | <property name="label" translatable="yes">Confirm your password:</property> |
300 | 150 | <property name="label" translatable="yes"><small><span color="darkgreen">Strong password</span></small></property> | 78 | <property name="justify">right</property> |
301 | 151 | <property name="use_markup">True</property> | 79 | <property name="xalign">1</property> |
302 | 152 | </object> | 80 | </object> |
303 | 153 | <packing> | 81 | <packing> |
307 | 154 | <property name="expand">False</property> | 82 | <property name="left_attach">0</property> |
308 | 155 | <property name="fill">False</property> | 83 | <property name="top_attach">4</property> |
306 | 156 | <property name="position">1</property> | ||
309 | 157 | </packing> | 84 | </packing> |
310 | 158 | </child> | 85 | </child> |
311 | 159 | </object> | ||
312 | 160 | <packing> | ||
313 | 161 | <property name="left_attach">1</property> | ||
314 | 162 | <property name="top_attach">3</property> | ||
315 | 163 | </packing> | ||
316 | 164 | </child> | ||
317 | 165 | <child> | ||
318 | 166 | <object class="GtkBox" id="hbox2"> | ||
319 | 167 | <property name="visible">True</property> | ||
320 | 168 | <property name="can_focus">False</property> | ||
321 | 169 | <property name="spacing">6</property> | ||
322 | 170 | <child> | 86 | <child> |
324 | 171 | <object class="GtkEntry" id="verified_password"> | 87 | <object class="GtkBox" id="login_vbox"> |
325 | 172 | <property name="visible">True</property> | 88 | <property name="visible">True</property> |
336 | 173 | <property name="can_focus">True</property> | 89 | <property name="can_focus">False</property> |
337 | 174 | <property name="visibility">False</property> | 90 | <property name="orientation">vertical</property> |
338 | 175 | <property name="invisible_char">●</property> | 91 | <property name="spacing">3</property> |
339 | 176 | <property name="activates_default">True</property> | 92 | <child> |
340 | 177 | <property name="width_chars">20</property> | 93 | <object class="GtkRadioButton" id="login_auto"> |
341 | 178 | <property name="invisible_char_set">True</property> | 94 | <property name="label" translatable="yes">Log in automatically</property> |
342 | 179 | <accessibility> | 95 | <property name="visible">True</property> |
343 | 180 | <relation type="labelled-by" target="verified_password_label"/> | 96 | <property name="can_focus">True</property> |
344 | 181 | </accessibility> | 97 | <property name="receives_default">False</property> |
345 | 182 | <signal name="changed" handler="info_loop" swapped="no"/> | 98 | <property name="draw_indicator">True</property> |
346 | 99 | <property name="group">login_pass</property> | ||
347 | 100 | </object> | ||
348 | 101 | <packing> | ||
349 | 102 | <property name="expand">False</property> | ||
350 | 103 | <property name="fill">False</property> | ||
351 | 104 | <property name="position">0</property> | ||
352 | 105 | </packing> | ||
353 | 106 | </child> | ||
354 | 107 | <child> | ||
355 | 108 | <object class="GtkRadioButton" id="login_pass"> | ||
356 | 109 | <property name="label" translatable="yes">Require my password to log in</property> | ||
357 | 110 | <property name="visible">True</property> | ||
358 | 111 | <property name="can_focus">True</property> | ||
359 | 112 | <property name="receives_default">False</property> | ||
360 | 113 | <property name="active">True</property> | ||
361 | 114 | <property name="draw_indicator">True</property> | ||
362 | 115 | </object> | ||
363 | 116 | <packing> | ||
364 | 117 | <property name="expand">False</property> | ||
365 | 118 | <property name="fill">False</property> | ||
366 | 119 | <property name="position">1</property> | ||
367 | 120 | </packing> | ||
368 | 121 | </child> | ||
369 | 183 | </object> | 122 | </object> |
370 | 184 | <packing> | 123 | <packing> |
374 | 185 | <property name="expand">False</property> | 124 | <property name="left_attach">1</property> |
375 | 186 | <property name="fill">False</property> | 125 | <property name="top_attach">5</property> |
373 | 187 | <property name="position">0</property> | ||
376 | 188 | </packing> | 126 | </packing> |
377 | 189 | </child> | 127 | </child> |
378 | 190 | <child> | 128 | <child> |
380 | 191 | <object class="GtkImage" id="password_ok"> | 129 | <object class="GtkBox" id="hbox1"> |
381 | 130 | <property name="visible">True</property> | ||
382 | 192 | <property name="can_focus">False</property> | 131 | <property name="can_focus">False</property> |
384 | 193 | <property name="stock">gtk-yes</property> | 132 | <property name="spacing">6</property> |
385 | 133 | <child> | ||
386 | 134 | <object class="GtkEntry" id="password"> | ||
387 | 135 | <property name="visible">True</property> | ||
388 | 136 | <property name="can_focus">True</property> | ||
389 | 137 | <property name="visibility">False</property> | ||
390 | 138 | <property name="invisible_char">●</property> | ||
391 | 139 | <property name="activates_default">True</property> | ||
392 | 140 | <property name="width_chars">20</property> | ||
393 | 141 | <signal name="changed" handler="info_loop" swapped="no"/> | ||
394 | 142 | <accessibility> | ||
395 | 143 | <relation type="labelled-by" target="password_label"/> | ||
396 | 144 | </accessibility> | ||
397 | 145 | </object> | ||
398 | 146 | <packing> | ||
399 | 147 | <property name="expand">False</property> | ||
400 | 148 | <property name="fill">False</property> | ||
401 | 149 | <property name="position">0</property> | ||
402 | 150 | </packing> | ||
403 | 151 | </child> | ||
404 | 152 | <child> | ||
405 | 153 | <object class="GtkLabel" id="password_strength"> | ||
406 | 154 | <property name="can_focus">False</property> | ||
407 | 155 | <property name="label" translatable="yes"><small><span color="darkgreen">Strong password</span></small></property> | ||
408 | 156 | <property name="use_markup">True</property> | ||
409 | 157 | <property name="xalign">0</property> | ||
410 | 158 | </object> | ||
411 | 159 | <packing> | ||
412 | 160 | <property name="expand">False</property> | ||
413 | 161 | <property name="fill">False</property> | ||
414 | 162 | <property name="position">1</property> | ||
415 | 163 | </packing> | ||
416 | 164 | </child> | ||
417 | 194 | </object> | 165 | </object> |
418 | 195 | <packing> | 166 | <packing> |
422 | 196 | <property name="expand">False</property> | 167 | <property name="left_attach">1</property> |
423 | 197 | <property name="fill">False</property> | 168 | <property name="top_attach">3</property> |
421 | 198 | <property name="position">1</property> | ||
424 | 199 | </packing> | 169 | </packing> |
425 | 200 | </child> | 170 | </child> |
426 | 201 | <child> | 171 | <child> |
428 | 202 | <object class="GtkLabel" id="password_error_label"> | 172 | <object class="GtkBox" id="hbox2"> |
429 | 203 | <property name="visible">True</property> | 173 | <property name="visible">True</property> |
430 | 204 | <property name="can_focus">False</property> | 174 | <property name="can_focus">False</property> |
434 | 205 | <property name="xalign">0</property> | 175 | <property name="spacing">6</property> |
435 | 206 | <property name="label" translatable="yes"><small><span color="darkred">You must enter a username</span></small></property> | 176 | <child> |
436 | 207 | <property name="use_markup">True</property> | 177 | <object class="GtkEntry" id="verified_password"> |
437 | 178 | <property name="visible">True</property> | ||
438 | 179 | <property name="can_focus">True</property> | ||
439 | 180 | <property name="visibility">False</property> | ||
440 | 181 | <property name="invisible_char">●</property> | ||
441 | 182 | <property name="activates_default">True</property> | ||
442 | 183 | <property name="width_chars">20</property> | ||
443 | 184 | <signal name="changed" handler="info_loop" swapped="no"/> | ||
444 | 185 | <accessibility> | ||
445 | 186 | <relation type="labelled-by" target="verified_password_label"/> | ||
446 | 187 | </accessibility> | ||
447 | 188 | </object> | ||
448 | 189 | <packing> | ||
449 | 190 | <property name="expand">False</property> | ||
450 | 191 | <property name="fill">False</property> | ||
451 | 192 | <property name="position">0</property> | ||
452 | 193 | </packing> | ||
453 | 194 | </child> | ||
454 | 195 | <child> | ||
455 | 196 | <object class="GtkImage" id="password_ok"> | ||
456 | 197 | <property name="can_focus">False</property> | ||
457 | 198 | <property name="stock">gtk-yes</property> | ||
458 | 199 | </object> | ||
459 | 200 | <packing> | ||
460 | 201 | <property name="expand">False</property> | ||
461 | 202 | <property name="fill">False</property> | ||
462 | 203 | <property name="position">1</property> | ||
463 | 204 | </packing> | ||
464 | 205 | </child> | ||
465 | 206 | <child> | ||
466 | 207 | <object class="GtkLabel" id="password_error_label"> | ||
467 | 208 | <property name="visible">True</property> | ||
468 | 209 | <property name="can_focus">False</property> | ||
469 | 210 | <property name="label" translatable="yes"><small><span color="darkred">You must enter a username</span></small></property> | ||
470 | 211 | <property name="use_markup">True</property> | ||
471 | 212 | <property name="xalign">0</property> | ||
472 | 213 | </object> | ||
473 | 214 | <packing> | ||
474 | 215 | <property name="expand">False</property> | ||
475 | 216 | <property name="fill">False</property> | ||
476 | 217 | <property name="position">2</property> | ||
477 | 218 | </packing> | ||
478 | 219 | </child> | ||
479 | 208 | </object> | 220 | </object> |
480 | 209 | <packing> | 221 | <packing> |
484 | 210 | <property name="expand">False</property> | 222 | <property name="left_attach">1</property> |
485 | 211 | <property name="fill">False</property> | 223 | <property name="top_attach">4</property> |
483 | 212 | <property name="position">2</property> | ||
486 | 213 | </packing> | 224 | </packing> |
487 | 214 | </child> | 225 | </child> |
488 | 215 | </object> | ||
489 | 216 | <packing> | ||
490 | 217 | <property name="left_attach">1</property> | ||
491 | 218 | <property name="top_attach">4</property> | ||
492 | 219 | </packing> | ||
493 | 220 | </child> | ||
494 | 221 | <child> | ||
495 | 222 | <object class="GtkBox" id="hbox3"> | ||
496 | 223 | <property name="visible">True</property> | ||
497 | 224 | <property name="can_focus">False</property> | ||
498 | 225 | <property name="spacing">6</property> | ||
499 | 226 | <child> | 226 | <child> |
501 | 227 | <object class="GtkEntry" id="fullname"> | 227 | <object class="GtkBox" id="hbox3"> |
502 | 228 | <property name="visible">True</property> | 228 | <property name="visible">True</property> |
511 | 229 | <property name="can_focus">True</property> | 229 | <property name="can_focus">False</property> |
512 | 230 | <property name="invisible_char">•</property> | 230 | <property name="spacing">6</property> |
513 | 231 | <property name="activates_default">True</property> | 231 | <child> |
514 | 232 | <property name="width_chars">40</property> | 232 | <object class="GtkEntry" id="fullname"> |
515 | 233 | <accessibility> | 233 | <property name="visible">True</property> |
516 | 234 | <relation type="labelled-by" target="fullname_label"/> | 234 | <property name="can_focus">True</property> |
517 | 235 | </accessibility> | 235 | <property name="invisible_char">•</property> |
518 | 236 | <signal name="changed" handler="info_loop" swapped="no"/> | 236 | <property name="activates_default">True</property> |
519 | 237 | <property name="width_chars">40</property> | ||
520 | 238 | <signal name="changed" handler="info_loop" swapped="no"/> | ||
521 | 239 | <accessibility> | ||
522 | 240 | <relation type="labelled-by" target="fullname_label"/> | ||
523 | 241 | </accessibility> | ||
524 | 242 | </object> | ||
525 | 243 | <packing> | ||
526 | 244 | <property name="expand">False</property> | ||
527 | 245 | <property name="fill">False</property> | ||
528 | 246 | <property name="position">0</property> | ||
529 | 247 | </packing> | ||
530 | 248 | </child> | ||
531 | 249 | <child> | ||
532 | 250 | <object class="GtkImage" id="fullname_ok"> | ||
533 | 251 | <property name="can_focus">False</property> | ||
534 | 252 | <property name="stock">gtk-yes</property> | ||
535 | 253 | </object> | ||
536 | 254 | <packing> | ||
537 | 255 | <property name="expand">False</property> | ||
538 | 256 | <property name="fill">False</property> | ||
539 | 257 | <property name="position">1</property> | ||
540 | 258 | </packing> | ||
541 | 259 | </child> | ||
542 | 237 | </object> | 260 | </object> |
543 | 238 | <packing> | 261 | <packing> |
547 | 239 | <property name="expand">False</property> | 262 | <property name="left_attach">1</property> |
548 | 240 | <property name="fill">False</property> | 263 | <property name="top_attach">0</property> |
546 | 241 | <property name="position">0</property> | ||
549 | 242 | </packing> | 264 | </packing> |
550 | 243 | </child> | 265 | </child> |
551 | 244 | <child> | 266 | <child> |
553 | 245 | <object class="GtkImage" id="fullname_ok"> | 267 | <object class="GtkBox" id="username_box"> |
554 | 268 | <property name="visible">True</property> | ||
555 | 246 | <property name="can_focus">False</property> | 269 | <property name="can_focus">False</property> |
557 | 247 | <property name="stock">gtk-yes</property> | 270 | <property name="spacing">6</property> |
558 | 271 | <child> | ||
559 | 272 | <object class="GtkEntry" id="username"> | ||
560 | 273 | <property name="visible">True</property> | ||
561 | 274 | <property name="can_focus">True</property> | ||
562 | 275 | <property name="max_length">32</property> | ||
563 | 276 | <property name="invisible_char">•</property> | ||
564 | 277 | <property name="activates_default">True</property> | ||
565 | 278 | <property name="width_chars">15</property> | ||
566 | 279 | <signal name="changed" handler="info_loop" swapped="no"/> | ||
567 | 280 | <accessibility> | ||
568 | 281 | <relation type="labelled-by" target="username_label"/> | ||
569 | 282 | </accessibility> | ||
570 | 283 | </object> | ||
571 | 284 | <packing> | ||
572 | 285 | <property name="expand">False</property> | ||
573 | 286 | <property name="fill">False</property> | ||
574 | 287 | <property name="position">0</property> | ||
575 | 288 | </packing> | ||
576 | 289 | </child> | ||
577 | 290 | <child> | ||
578 | 291 | <object class="GtkImage" id="username_ok"> | ||
579 | 292 | <property name="can_focus">False</property> | ||
580 | 293 | <property name="stock">gtk-yes</property> | ||
581 | 294 | </object> | ||
582 | 295 | <packing> | ||
583 | 296 | <property name="expand">False</property> | ||
584 | 297 | <property name="fill">False</property> | ||
585 | 298 | <property name="position">1</property> | ||
586 | 299 | </packing> | ||
587 | 300 | </child> | ||
588 | 301 | <child> | ||
589 | 302 | <object class="GtkLabel" id="username_error_label"> | ||
590 | 303 | <property name="visible">True</property> | ||
591 | 304 | <property name="can_focus">False</property> | ||
592 | 305 | <property name="label" translatable="yes"><small><span color="darkred">You must enter a username</span></small></property> | ||
593 | 306 | <property name="use_markup">True</property> | ||
594 | 307 | <property name="wrap">True</property> | ||
595 | 308 | <property name="xalign">0</property> | ||
596 | 309 | </object> | ||
597 | 310 | <packing> | ||
598 | 311 | <property name="expand">False</property> | ||
599 | 312 | <property name="fill">False</property> | ||
600 | 313 | <property name="position">2</property> | ||
601 | 314 | </packing> | ||
602 | 315 | </child> | ||
603 | 248 | </object> | 316 | </object> |
604 | 249 | <packing> | 317 | <packing> |
608 | 250 | <property name="expand">False</property> | 318 | <property name="left_attach">1</property> |
609 | 251 | <property name="fill">False</property> | 319 | <property name="top_attach">2</property> |
607 | 252 | <property name="position">1</property> | ||
610 | 253 | </packing> | 320 | </packing> |
611 | 254 | </child> | 321 | </child> |
612 | 255 | </object> | ||
613 | 256 | <packing> | ||
614 | 257 | <property name="left_attach">1</property> | ||
615 | 258 | </packing> | ||
616 | 259 | </child> | ||
617 | 260 | <child> | ||
618 | 261 | <object class="GtkBox" id="username_box"> | ||
619 | 262 | <property name="visible">True</property> | ||
620 | 263 | <property name="can_focus">False</property> | ||
621 | 264 | <property name="spacing">6</property> | ||
622 | 265 | <child> | 322 | <child> |
624 | 266 | <object class="GtkEntry" id="username"> | 323 | <object class="GtkBox" id="box1"> |
625 | 267 | <property name="visible">True</property> | 324 | <property name="visible">True</property> |
635 | 268 | <property name="can_focus">True</property> | 325 | <property name="can_focus">False</property> |
636 | 269 | <property name="max_length">32</property> | 326 | <property name="orientation">vertical</property> |
637 | 270 | <property name="invisible_char">•</property> | 327 | <child> |
638 | 271 | <property name="activates_default">True</property> | 328 | <placeholder/> |
639 | 272 | <property name="width_chars">15</property> | 329 | </child> |
631 | 273 | <accessibility> | ||
632 | 274 | <relation type="labelled-by" target="username_label"/> | ||
633 | 275 | </accessibility> | ||
634 | 276 | <signal name="changed" handler="info_loop" swapped="no"/> | ||
640 | 277 | </object> | 330 | </object> |
641 | 278 | <packing> | 331 | <packing> |
645 | 279 | <property name="expand">False</property> | 332 | <property name="left_attach">0</property> |
646 | 280 | <property name="fill">False</property> | 333 | <property name="top_attach">5</property> |
644 | 281 | <property name="position">0</property> | ||
647 | 282 | </packing> | 334 | </packing> |
648 | 283 | </child> | 335 | </child> |
649 | 284 | <child> | 336 | <child> |
651 | 285 | <object class="GtkImage" id="username_ok"> | 337 | <object class="GtkBox" id="hostname_box"> |
652 | 338 | <property name="visible">True</property> | ||
653 | 286 | <property name="can_focus">False</property> | 339 | <property name="can_focus">False</property> |
655 | 287 | <property name="stock">gtk-yes</property> | 340 | <property name="orientation">vertical</property> |
656 | 341 | <property name="spacing">3</property> | ||
657 | 342 | <child> | ||
658 | 343 | <object class="GtkBox" id="box3"> | ||
659 | 344 | <property name="visible">True</property> | ||
660 | 345 | <property name="can_focus">False</property> | ||
661 | 346 | <property name="spacing">6</property> | ||
662 | 347 | <child> | ||
663 | 348 | <object class="GtkEntry" id="hostname"> | ||
664 | 349 | <property name="visible">True</property> | ||
665 | 350 | <property name="can_focus">True</property> | ||
666 | 351 | <property name="invisible_char">•</property> | ||
667 | 352 | <signal name="changed" handler="info_loop" swapped="no"/> | ||
668 | 353 | <accessibility> | ||
669 | 354 | <relation type="labelled-by" target="hostname_label"/> | ||
670 | 355 | <relation type="labelled-by" target="hostname_extra_label"/> | ||
671 | 356 | </accessibility> | ||
672 | 357 | </object> | ||
673 | 358 | <packing> | ||
674 | 359 | <property name="expand">False</property> | ||
675 | 360 | <property name="fill">True</property> | ||
676 | 361 | <property name="position">0</property> | ||
677 | 362 | </packing> | ||
678 | 363 | </child> | ||
679 | 364 | <child> | ||
680 | 365 | <object class="GtkImage" id="hostname_ok"> | ||
681 | 366 | <property name="can_focus">False</property> | ||
682 | 367 | <property name="stock">gtk-yes</property> | ||
683 | 368 | </object> | ||
684 | 369 | <packing> | ||
685 | 370 | <property name="expand">False</property> | ||
686 | 371 | <property name="fill">False</property> | ||
687 | 372 | <property name="position">1</property> | ||
688 | 373 | </packing> | ||
689 | 374 | </child> | ||
690 | 375 | <child> | ||
691 | 376 | <object class="GtkLabel" id="hostname_error_label"> | ||
692 | 377 | <property name="visible">True</property> | ||
693 | 378 | <property name="can_focus">False</property> | ||
694 | 379 | <property name="label" translatable="yes"><small><span color="darkred">You must enter a name</span></small></property> | ||
695 | 380 | <property name="use_markup">True</property> | ||
696 | 381 | <property name="wrap">True</property> | ||
697 | 382 | </object> | ||
698 | 383 | <packing> | ||
699 | 384 | <property name="expand">False</property> | ||
700 | 385 | <property name="fill">True</property> | ||
701 | 386 | <property name="position">2</property> | ||
702 | 387 | </packing> | ||
703 | 388 | </child> | ||
704 | 389 | </object> | ||
705 | 390 | <packing> | ||
706 | 391 | <property name="expand">False</property> | ||
707 | 392 | <property name="fill">True</property> | ||
708 | 393 | <property name="position">0</property> | ||
709 | 394 | </packing> | ||
710 | 395 | </child> | ||
711 | 396 | <child> | ||
712 | 397 | <object class="GtkLabel" id="hostname_extra_label"> | ||
713 | 398 | <property name="visible">True</property> | ||
714 | 399 | <property name="can_focus">False</property> | ||
715 | 400 | <property name="label" translatable="yes">The name it uses when it talks to other computers.</property> | ||
716 | 401 | <property name="xalign">0</property> | ||
717 | 402 | <attributes> | ||
718 | 403 | <attribute name="scale" value="0.83333333333333304"/> | ||
719 | 404 | </attributes> | ||
720 | 405 | </object> | ||
721 | 406 | <packing> | ||
722 | 407 | <property name="expand">False</property> | ||
723 | 408 | <property name="fill">True</property> | ||
724 | 409 | <property name="position">1</property> | ||
725 | 410 | </packing> | ||
726 | 411 | </child> | ||
727 | 288 | </object> | 412 | </object> |
728 | 289 | <packing> | 413 | <packing> |
732 | 290 | <property name="expand">False</property> | 414 | <property name="left_attach">1</property> |
733 | 291 | <property name="fill">False</property> | 415 | <property name="top_attach">1</property> |
731 | 292 | <property name="position">1</property> | ||
734 | 293 | </packing> | 416 | </packing> |
735 | 294 | </child> | 417 | </child> |
736 | 295 | <child> | 418 | <child> |
738 | 296 | <object class="GtkLabel" id="username_error_label"> | 419 | <object class="GtkAlignment" id="alignment2"> |
739 | 297 | <property name="visible">True</property> | 420 | <property name="visible">True</property> |
740 | 298 | <property name="can_focus">False</property> | 421 | <property name="can_focus">False</property> |
745 | 299 | <property name="xalign">0</property> | 422 | <property name="bottom_padding">20</property> |
746 | 300 | <property name="label" translatable="yes"><small><span color="darkred">You must enter a username</span></small></property> | 423 | <child> |
747 | 301 | <property name="use_markup">True</property> | 424 | <object class="GtkLabel" id="hostname_label"> |
748 | 302 | <property name="wrap">True</property> | 425 | <property name="visible">True</property> |
749 | 426 | <property name="can_focus">False</property> | ||
750 | 427 | <property name="label" translatable="yes">Your computer's name:</property> | ||
751 | 428 | <property name="xalign">1</property> | ||
752 | 429 | </object> | ||
753 | 430 | </child> | ||
754 | 303 | </object> | 431 | </object> |
755 | 304 | <packing> | 432 | <packing> |
759 | 305 | <property name="expand">False</property> | 433 | <property name="left_attach">0</property> |
760 | 306 | <property name="fill">False</property> | 434 | <property name="top_attach">1</property> |
761 | 307 | <property name="position">2</property> | 435 | </packing> |
762 | 436 | </child> | ||
763 | 437 | <child> | ||
764 | 438 | <object class="GtkBox"> | ||
765 | 439 | <property name="visible">True</property> | ||
766 | 440 | <property name="can_focus">False</property> | ||
767 | 441 | <property name="orientation">vertical</property> | ||
768 | 442 | <property name="spacing">6</property> | ||
769 | 443 | <child> | ||
770 | 444 | <object class="GtkCheckButton" id="login_directory"> | ||
771 | 445 | <property name="label" translatable="yes">Use Active Directory</property> | ||
772 | 446 | <property name="visible">True</property> | ||
773 | 447 | <property name="can_focus">True</property> | ||
774 | 448 | <property name="receives_default">False</property> | ||
775 | 449 | <property name="draw_indicator">True</property> | ||
776 | 450 | <signal name="toggled" handler="on_login_directory_toggled" swapped="no"/> | ||
777 | 451 | </object> | ||
778 | 452 | <packing> | ||
779 | 453 | <property name="expand">False</property> | ||
780 | 454 | <property name="fill">False</property> | ||
781 | 455 | <property name="position">0</property> | ||
782 | 456 | </packing> | ||
783 | 457 | </child> | ||
784 | 458 | <child> | ||
785 | 459 | <object class="GtkLabel" id="login_directory_extra_label"> | ||
786 | 460 | <property name="visible">True</property> | ||
787 | 461 | <property name="can_focus">False</property> | ||
788 | 462 | <property name="label" translatable="yes"> You'll enter domain and other details in the next step.</property> | ||
789 | 463 | <property name="xalign">0</property> | ||
790 | 464 | <attributes> | ||
791 | 465 | <attribute name="scale" value="0.83333333333333304"/> | ||
792 | 466 | </attributes> | ||
793 | 467 | </object> | ||
794 | 468 | <packing> | ||
795 | 469 | <property name="expand">False</property> | ||
796 | 470 | <property name="fill">True</property> | ||
797 | 471 | <property name="position">1</property> | ||
798 | 472 | </packing> | ||
799 | 473 | </child> | ||
800 | 474 | </object> | ||
801 | 475 | <packing> | ||
802 | 476 | <property name="left_attach">1</property> | ||
803 | 477 | <property name="top_attach">6</property> | ||
804 | 308 | </packing> | 478 | </packing> |
805 | 309 | </child> | 479 | </child> |
806 | 310 | </object> | ||
807 | 311 | <packing> | ||
808 | 312 | <property name="left_attach">1</property> | ||
809 | 313 | <property name="top_attach">2</property> | ||
810 | 314 | </packing> | ||
811 | 315 | </child> | ||
812 | 316 | <child> | ||
813 | 317 | <object class="GtkBox" id="box1"> | ||
814 | 318 | <property name="visible">True</property> | ||
815 | 319 | <property name="can_focus">False</property> | ||
816 | 320 | <property name="orientation">vertical</property> | ||
817 | 321 | <child> | 480 | <child> |
818 | 322 | <placeholder/> | 481 | <placeholder/> |
819 | 323 | </child> | 482 | </child> |
820 | 324 | </object> | 483 | </object> |
825 | 325 | <packing> | 484 | </child> |
826 | 326 | <property name="left_attach">0</property> | 485 | <child type="tab"> |
827 | 327 | <property name="top_attach">5</property> | 486 | <placeholder/> |
824 | 328 | </packing> | ||
828 | 329 | </child> | 487 | </child> |
829 | 330 | <child> | 488 | <child> |
831 | 331 | <object class="GtkBox" id="hostname_box"> | 489 | <object class="GtkGrid" id="directory_table"> |
832 | 332 | <property name="visible">True</property> | 490 | <property name="visible">True</property> |
833 | 333 | <property name="can_focus">False</property> | 491 | <property name="can_focus">False</property> |
836 | 334 | <property name="orientation">vertical</property> | 492 | <property name="border_width">20</property> |
837 | 335 | <property name="spacing">3</property> | 493 | <property name="row_spacing">6</property> |
838 | 494 | <property name="column_spacing">6</property> | ||
839 | 336 | <child> | 495 | <child> |
841 | 337 | <object class="GtkBox" id="box3"> | 496 | <object class="GtkLabel" id="domain_user_label"> |
842 | 497 | <property name="visible">True</property> | ||
843 | 498 | <property name="can_focus">False</property> | ||
844 | 499 | <property name="label" translatable="yes">Domain administrator:</property> | ||
845 | 500 | <property name="justify">right</property> | ||
846 | 501 | <property name="xalign">1</property> | ||
847 | 502 | </object> | ||
848 | 503 | <packing> | ||
849 | 504 | <property name="left_attach">0</property> | ||
850 | 505 | <property name="top_attach">1</property> | ||
851 | 506 | </packing> | ||
852 | 507 | </child> | ||
853 | 508 | <child> | ||
854 | 509 | <object class="GtkBox" id="domain_user_box"> | ||
855 | 338 | <property name="visible">True</property> | 510 | <property name="visible">True</property> |
856 | 339 | <property name="can_focus">False</property> | 511 | <property name="can_focus">False</property> |
857 | 340 | <property name="spacing">6</property> | 512 | <property name="spacing">6</property> |
858 | 341 | <child> | 513 | <child> |
860 | 342 | <object class="GtkEntry" id="hostname"> | 514 | <object class="GtkEntry" id="domain_user"> |
861 | 343 | <property name="visible">True</property> | 515 | <property name="visible">True</property> |
862 | 344 | <property name="can_focus">True</property> | 516 | <property name="can_focus">True</property> |
863 | 517 | <property name="max_length">32</property> | ||
864 | 345 | <property name="invisible_char">•</property> | 518 | <property name="invisible_char">•</property> |
870 | 346 | <accessibility> | 519 | <property name="activates_default">True</property> |
871 | 347 | <relation type="labelled-by" target="hostname_label"/> | 520 | <property name="width_chars">15</property> |
872 | 348 | <relation type="labelled-by" target="hostname_extra_label"/> | 521 | <signal name="changed" handler="validate_directory_info" swapped="no"/> |
868 | 349 | </accessibility> | ||
869 | 350 | <signal name="changed" handler="info_loop" swapped="no"/> | ||
873 | 351 | </object> | 522 | </object> |
874 | 352 | <packing> | 523 | <packing> |
875 | 353 | <property name="expand">False</property> | 524 | <property name="expand">False</property> |
877 | 354 | <property name="fill">True</property> | 525 | <property name="fill">False</property> |
878 | 355 | <property name="position">0</property> | 526 | <property name="position">0</property> |
879 | 356 | </packing> | 527 | </packing> |
880 | 357 | </child> | 528 | </child> |
881 | 358 | <child> | 529 | <child> |
883 | 359 | <object class="GtkImage" id="hostname_ok"> | 530 | <object class="GtkImage" id="domain_user_ok"> |
884 | 360 | <property name="can_focus">False</property> | 531 | <property name="can_focus">False</property> |
885 | 361 | <property name="stock">gtk-yes</property> | 532 | <property name="stock">gtk-yes</property> |
886 | 362 | </object> | 533 | </object> |
887 | @@ -367,71 +538,163 @@ | |||
888 | 367 | </packing> | 538 | </packing> |
889 | 368 | </child> | 539 | </child> |
890 | 369 | <child> | 540 | <child> |
892 | 370 | <object class="GtkLabel" id="hostname_error_label"> | 541 | <object class="GtkLabel" id="domain_user_error_label"> |
893 | 371 | <property name="visible">True</property> | 542 | <property name="visible">True</property> |
894 | 372 | <property name="can_focus">False</property> | 543 | <property name="can_focus">False</property> |
896 | 373 | <property name="label" translatable="yes"><small><span color="darkred">You must enter a name</span></small></property> | 544 | <property name="label" translatable="yes"><small><span color="darkred">You must enter a user name</span></small></property> |
897 | 374 | <property name="use_markup">True</property> | 545 | <property name="use_markup">True</property> |
898 | 375 | <property name="wrap">True</property> | 546 | <property name="wrap">True</property> |
899 | 547 | <property name="xalign">0</property> | ||
900 | 376 | </object> | 548 | </object> |
901 | 377 | <packing> | 549 | <packing> |
902 | 378 | <property name="expand">False</property> | 550 | <property name="expand">False</property> |
904 | 379 | <property name="fill">True</property> | 551 | <property name="fill">False</property> |
905 | 380 | <property name="position">2</property> | 552 | <property name="position">2</property> |
906 | 381 | </packing> | 553 | </packing> |
907 | 382 | </child> | 554 | </child> |
908 | 383 | </object> | 555 | </object> |
909 | 384 | <packing> | 556 | <packing> |
913 | 385 | <property name="expand">False</property> | 557 | <property name="left_attach">1</property> |
914 | 386 | <property name="fill">True</property> | 558 | <property name="top_attach">1</property> |
912 | 387 | <property name="position">0</property> | ||
915 | 388 | </packing> | 559 | </packing> |
916 | 389 | </child> | 560 | </child> |
917 | 390 | <child> | 561 | <child> |
919 | 391 | <object class="GtkLabel" id="hostname_extra_label"> | 562 | <object class="GtkLabel" id="domain_passwd_label"> |
920 | 392 | <property name="visible">True</property> | 563 | <property name="visible">True</property> |
921 | 393 | <property name="can_focus">False</property> | 564 | <property name="can_focus">False</property> |
927 | 394 | <property name="xalign">0</property> | 565 | <property name="label" translatable="yes">Password:</property> |
928 | 395 | <property name="label" translatable="yes">The name it uses when it talks to other computers.</property> | 566 | <property name="justify">right</property> |
929 | 396 | <attributes> | 567 | <property name="xalign">1</property> |
925 | 397 | <attribute name="scale" value="0.83333333333333304"/> | ||
926 | 398 | </attributes> | ||
930 | 399 | </object> | 568 | </object> |
931 | 400 | <packing> | 569 | <packing> |
935 | 401 | <property name="expand">False</property> | 570 | <property name="left_attach">0</property> |
936 | 402 | <property name="fill">True</property> | 571 | <property name="top_attach">2</property> |
934 | 403 | <property name="position">1</property> | ||
937 | 404 | </packing> | 572 | </packing> |
938 | 405 | </child> | 573 | </child> |
939 | 406 | </object> | ||
940 | 407 | <packing> | ||
941 | 408 | <property name="left_attach">1</property> | ||
942 | 409 | <property name="top_attach">1</property> | ||
943 | 410 | </packing> | ||
944 | 411 | </child> | ||
945 | 412 | <child> | ||
946 | 413 | <object class="GtkAlignment" id="alignment2"> | ||
947 | 414 | <property name="visible">True</property> | ||
948 | 415 | <property name="can_focus">False</property> | ||
949 | 416 | <property name="bottom_padding">20</property> | ||
950 | 417 | <child> | 574 | <child> |
952 | 418 | <object class="GtkLabel" id="hostname_label"> | 575 | <object class="GtkBox" id="di_hbox"> |
953 | 419 | <property name="visible">True</property> | 576 | <property name="visible">True</property> |
954 | 420 | <property name="can_focus">False</property> | 577 | <property name="can_focus">False</property> |
955 | 578 | <property name="spacing">6</property> | ||
956 | 579 | <child> | ||
957 | 580 | <object class="GtkEntry" id="domain_passwd"> | ||
958 | 581 | <property name="visible">True</property> | ||
959 | 582 | <property name="can_focus">True</property> | ||
960 | 583 | <property name="visibility">False</property> | ||
961 | 584 | <property name="invisible_char">●</property> | ||
962 | 585 | <property name="activates_default">True</property> | ||
963 | 586 | <property name="width_chars">20</property> | ||
964 | 587 | <signal name="changed" handler="validate_directory_info" swapped="no"/> | ||
965 | 588 | </object> | ||
966 | 589 | <packing> | ||
967 | 590 | <property name="expand">False</property> | ||
968 | 591 | <property name="fill">False</property> | ||
969 | 592 | <property name="position">0</property> | ||
970 | 593 | </packing> | ||
971 | 594 | </child> | ||
972 | 595 | <child> | ||
973 | 596 | <placeholder/> | ||
974 | 597 | </child> | ||
975 | 598 | </object> | ||
976 | 599 | <packing> | ||
977 | 600 | <property name="left_attach">1</property> | ||
978 | 601 | <property name="top_attach">2</property> | ||
979 | 602 | </packing> | ||
980 | 603 | </child> | ||
981 | 604 | <child> | ||
982 | 605 | <object class="GtkLabel" id="domain_label"> | ||
983 | 606 | <property name="visible">True</property> | ||
984 | 607 | <property name="can_focus">False</property> | ||
985 | 608 | <property name="label" translatable="yes">Domain:</property> | ||
986 | 421 | <property name="xalign">1</property> | 609 | <property name="xalign">1</property> |
987 | 422 | <property name="label" translatable="yes">Your computer's name:</property> | ||
988 | 423 | </object> | 610 | </object> |
989 | 611 | <packing> | ||
990 | 612 | <property name="left_attach">0</property> | ||
991 | 613 | <property name="top_attach">0</property> | ||
992 | 614 | </packing> | ||
993 | 615 | </child> | ||
994 | 616 | <child> | ||
995 | 617 | <object class="GtkBox" id="di_box"> | ||
996 | 618 | <property name="visible">True</property> | ||
997 | 619 | <property name="can_focus">False</property> | ||
998 | 620 | <property name="spacing">6</property> | ||
999 | 621 | <child> | ||
1000 | 622 | <object class="GtkEntry" id="domain_name"> | ||
1001 | 623 | <property name="visible">True</property> | ||
1002 | 624 | <property name="can_focus">True</property> | ||
1003 | 625 | <property name="invisible_char">•</property> | ||
1004 | 626 | <signal name="changed" handler="validate_directory_info" swapped="no"/> | ||
1005 | 627 | </object> | ||
1006 | 628 | <packing> | ||
1007 | 629 | <property name="expand">False</property> | ||
1008 | 630 | <property name="fill">True</property> | ||
1009 | 631 | <property name="position">0</property> | ||
1010 | 632 | </packing> | ||
1011 | 633 | </child> | ||
1012 | 634 | <child> | ||
1013 | 635 | <object class="GtkButton" id="directory_testbutton"> | ||
1014 | 636 | <property name="label" translatable="yes">Test connection</property> | ||
1015 | 637 | <property name="visible">True</property> | ||
1016 | 638 | <property name="sensitive">False</property> | ||
1017 | 639 | <property name="can_focus">True</property> | ||
1018 | 640 | <property name="receives_default">True</property> | ||
1019 | 641 | <signal name="clicked" handler="on_testdomain_click" swapped="no"/> | ||
1020 | 642 | </object> | ||
1021 | 643 | <packing> | ||
1022 | 644 | <property name="expand">False</property> | ||
1023 | 645 | <property name="fill">True</property> | ||
1024 | 646 | <property name="position">1</property> | ||
1025 | 647 | </packing> | ||
1026 | 648 | </child> | ||
1027 | 649 | <child> | ||
1028 | 650 | <object class="GtkImage" id="domain_name_ok"> | ||
1029 | 651 | <property name="can_focus">False</property> | ||
1030 | 652 | <property name="stock">gtk-yes</property> | ||
1031 | 653 | </object> | ||
1032 | 654 | <packing> | ||
1033 | 655 | <property name="expand">False</property> | ||
1034 | 656 | <property name="fill">False</property> | ||
1035 | 657 | <property name="position">2</property> | ||
1036 | 658 | </packing> | ||
1037 | 659 | </child> | ||
1038 | 660 | <child> | ||
1039 | 661 | <object class="GtkLabel" id="domain_name_error_label"> | ||
1040 | 662 | <property name="visible">True</property> | ||
1041 | 663 | <property name="can_focus">False</property> | ||
1042 | 664 | <property name="label" translatable="yes"><small><span color="darkred">You must enter a domain name</span></small></property> | ||
1043 | 665 | <property name="use_markup">True</property> | ||
1044 | 666 | <property name="wrap">True</property> | ||
1045 | 667 | </object> | ||
1046 | 668 | <packing> | ||
1047 | 669 | <property name="expand">False</property> | ||
1048 | 670 | <property name="fill">True</property> | ||
1049 | 671 | <property name="position">3</property> | ||
1050 | 672 | </packing> | ||
1051 | 673 | </child> | ||
1052 | 674 | </object> | ||
1053 | 675 | <packing> | ||
1054 | 676 | <property name="left_attach">1</property> | ||
1055 | 677 | <property name="top_attach">0</property> | ||
1056 | 678 | </packing> | ||
1057 | 424 | </child> | 679 | </child> |
1058 | 425 | </object> | 680 | </object> |
1059 | 426 | <packing> | 681 | <packing> |
1062 | 427 | <property name="left_attach">0</property> | 682 | <property name="position">1</property> |
1061 | 428 | <property name="top_attach">1</property> | ||
1063 | 429 | </packing> | 683 | </packing> |
1064 | 430 | </child> | 684 | </child> |
1065 | 685 | <child type="tab"> | ||
1066 | 686 | <placeholder/> | ||
1067 | 687 | </child> | ||
1068 | 688 | <child> | ||
1069 | 689 | <placeholder/> | ||
1070 | 690 | </child> | ||
1071 | 691 | <child type="tab"> | ||
1072 | 692 | <placeholder/> | ||
1073 | 693 | </child> | ||
1074 | 431 | </object> | 694 | </object> |
1075 | 432 | <packing> | 695 | <packing> |
1076 | 433 | <property name="expand">False</property> | 696 | <property name="expand">False</property> |
1078 | 434 | <property name="fill">False</property> | 697 | <property name="fill">True</property> |
1079 | 435 | <property name="position">1</property> | 698 | <property name="position">1</property> |
1080 | 436 | </packing> | 699 | </packing> |
1081 | 437 | </child> | 700 | </child> |
1082 | diff --git a/scripts/plugininstall.py b/scripts/plugininstall.py | |||
1083 | index e9acdc9..434fd3b 100755 | |||
1084 | --- a/scripts/plugininstall.py | |||
1085 | +++ b/scripts/plugininstall.py | |||
1086 | @@ -228,6 +228,10 @@ class Install(install_misc.InstallBase): | |||
1087 | 228 | self.configure_zsys() | 228 | self.configure_zsys() |
1088 | 229 | 229 | ||
1089 | 230 | self.next_region() | 230 | self.next_region() |
1090 | 231 | self.db.progress('INFO', 'ubiquity/install/activedirectory') | ||
1091 | 232 | self.configure_active_directory() | ||
1092 | 233 | |||
1093 | 234 | self.next_region() | ||
1094 | 231 | self.db.progress('INFO', 'ubiquity/install/bootloader') | 235 | self.db.progress('INFO', 'ubiquity/install/bootloader') |
1095 | 232 | self.copy_mok() | 236 | self.copy_mok() |
1096 | 233 | self.configure_bootloader() | 237 | self.configure_bootloader() |
1097 | @@ -968,6 +972,72 @@ class Install(install_misc.InstallBase): | |||
1098 | 968 | if use_zfs: | 972 | if use_zfs: |
1099 | 969 | misc.execute_root('/usr/share/ubiquity/zsys-setup', 'finalize') | 973 | misc.execute_root('/usr/share/ubiquity/zsys-setup', 'finalize') |
1100 | 970 | 974 | ||
1101 | 975 | def configure_active_directory(self): | ||
1102 | 976 | """ Join Active Directory domain and enable pam_mkhomedir """ | ||
1103 | 977 | use_directory = self.db.get('ubiquity/login_use_directory') | ||
1104 | 978 | if use_directory != 'true': | ||
1105 | 979 | return | ||
1106 | 980 | |||
1107 | 981 | from socket import gethostname | ||
1108 | 982 | hostname_cur = gethostname() | ||
1109 | 983 | hostname_new = '' | ||
1110 | 984 | with open(self.target_file('etc/hostname'), 'r') as f: | ||
1111 | 985 | hostname_new = f.read().strip() | ||
1112 | 986 | |||
1113 | 987 | # Set hostname for AD to determine FQDN (no fqdn option in realm join, only adcli) | ||
1114 | 988 | misc.execute_root('hostname', hostname_new) | ||
1115 | 989 | |||
1116 | 990 | directory_domain = self.db.get('ubiquity/directory_domain') | ||
1117 | 991 | directory_user = self.db.get('ubiquity/directory_user') | ||
1118 | 992 | directory_passwd = self.db.get('ubiquity/directory_passwd') | ||
1119 | 993 | |||
1120 | 994 | binds = ("/proc", "/sys", "/dev", "/run") | ||
1121 | 995 | try: | ||
1122 | 996 | for bind in binds: | ||
1123 | 997 | misc.execute('mount', '--bind', bind, self.target + bind) | ||
1124 | 998 | # join AD on host (services are running on host) | ||
1125 | 999 | if not self.join_domain(hostname_new, directory_domain, directory_user, directory_passwd): | ||
1126 | 1000 | self.db.input('critical', 'ubiquity/install/broken_active_directory') | ||
1127 | 1001 | self.db.go() | ||
1128 | 1002 | finally: | ||
1129 | 1003 | for bind in binds: | ||
1130 | 1004 | misc.execute('umount', '-f', self.target + bind) | ||
1131 | 1005 | # Reset hostname | ||
1132 | 1006 | misc.execute_root('hostname', hostname_cur) | ||
1133 | 1007 | |||
1134 | 1008 | # Enable pam_mkhomedir | ||
1135 | 1009 | try: | ||
1136 | 1010 | subprocess.check_call(['chroot', self.target, 'pam-auth-update', | ||
1137 | 1011 | '--package', '--enable', 'mkhomedir'], | ||
1138 | 1012 | preexec_fn=install_misc.debconf_disconnect) | ||
1139 | 1013 | except subprocess.CalledProcessError: | ||
1140 | 1014 | self.db.input('critical', 'ubiquity/install/broken_active_directory') | ||
1141 | 1015 | self.db.go() | ||
1142 | 1016 | |||
1143 | 1017 | def join_domain(self, hostname, directory_domain, directory_user, directory_passwd): | ||
1144 | 1018 | """ Join an Active Directory domain """ | ||
1145 | 1019 | log_args = ['log-output', '-t', 'ubiquity'] | ||
1146 | 1020 | log_args.extend(['realm', 'join', '--install', self.target, | ||
1147 | 1021 | '--user', directory_user, '--computer-name', hostname, | ||
1148 | 1022 | '--unattended', directory_domain]) | ||
1149 | 1023 | try: | ||
1150 | 1024 | p = subprocess.run(log_args, input=directory_passwd, timeout=60, encoding="utf-8") | ||
1151 | 1025 | except TimeoutError as e: | ||
1152 | 1026 | syslog.syslog(syslog.LOG_ERR, ' '.join(log_args)) | ||
1153 | 1027 | syslog.syslog(syslog.LOG_ERR, "Command timed out(%s): %s" % (e.errno, e.strerror)) | ||
1154 | 1028 | return False | ||
1155 | 1029 | except IOError as e: | ||
1156 | 1030 | syslog.syslog(syslog.LOG_ERR, ' '.join(log_args)) | ||
1157 | 1031 | syslog.syslog(syslog.LOG_ERR, "OS error(%s): %s" % (e.errno, e.strerror)) | ||
1158 | 1032 | return False | ||
1159 | 1033 | |||
1160 | 1034 | if p.returncode != 0: | ||
1161 | 1035 | syslog.syslog(syslog.LOG_ERR, ' '.join(log_args)) | ||
1162 | 1036 | return False | ||
1163 | 1037 | |||
1164 | 1038 | syslog.syslog(' '.join(log_args)) | ||
1165 | 1039 | return True | ||
1166 | 1040 | |||
1167 | 971 | def copy_mok(self): | 1041 | def copy_mok(self): |
1168 | 972 | if 'UBIQUITY_OEM_USER_CONFIG' in os.environ: | 1042 | if 'UBIQUITY_OEM_USER_CONFIG' in os.environ: |
1169 | 973 | return | 1043 | return |
1170 | diff --git a/tests/test_usersetup.py b/tests/test_usersetup.py | |||
1171 | index 0d6c178..33f4949 100644 | |||
1172 | --- a/tests/test_usersetup.py | |||
1173 | +++ b/tests/test_usersetup.py | |||
1174 | @@ -41,6 +41,7 @@ class UserSetupTests(unittest.TestCase): | |||
1175 | 41 | error_msg = 'That name already exists on the network.' | 41 | error_msg = 'That name already exists on the network.' |
1176 | 42 | self.gtk.resolver = UbiquityMockResolver.MockResolver( | 42 | self.gtk.resolver = UbiquityMockResolver.MockResolver( |
1177 | 43 | hostname='myhostname') | 43 | hostname='myhostname') |
1178 | 44 | self.gtk.plugin_translate('en') | ||
1179 | 44 | self.gtk.hostname_ok.show() | 45 | self.gtk.hostname_ok.show() |
1180 | 45 | self.gtk.hostname.set_text('myhostname') | 46 | self.gtk.hostname.set_text('myhostname') |
1181 | 46 | self.gtk.hostname_error = mock.Mock() | 47 | self.gtk.hostname_error = mock.Mock() |
1182 | diff --git a/ubiquity/components/plugininstall.py b/ubiquity/components/plugininstall.py | |||
1183 | index 213b57e..dcb04d6 100644 | |||
1184 | --- a/ubiquity/components/plugininstall.py | |||
1185 | +++ b/ubiquity/components/plugininstall.py | |||
1186 | @@ -65,6 +65,8 @@ class Install(FilteredCommand): | |||
1187 | 65 | return True | 65 | return True |
1188 | 66 | elif question == 'apt-setup/security-updates-failed': | 66 | elif question == 'apt-setup/security-updates-failed': |
1189 | 67 | fatal = False | 67 | fatal = False |
1190 | 68 | elif question == 'ubiquity/install/broken_active_directory': | ||
1191 | 69 | fatal = False | ||
1192 | 68 | else: | 70 | else: |
1193 | 69 | fatal = True | 71 | fatal = True |
1194 | 70 | self.frontend.error_dialog(self.description(question), | 72 | self.frontend.error_dialog(self.description(question), |
1195 | diff --git a/ubiquity/frontend/gtk_ui.py b/ubiquity/frontend/gtk_ui.py | |||
1196 | index 7280f96..c3a7dea 100644 | |||
1197 | --- a/ubiquity/frontend/gtk_ui.py | |||
1198 | +++ b/ubiquity/frontend/gtk_ui.py | |||
1199 | @@ -1887,14 +1887,22 @@ class Wizard(BaseFrontend): | |||
1200 | 1887 | msg = title | 1887 | msg = title |
1201 | 1888 | dialog = Gtk.MessageDialog( | 1888 | dialog = Gtk.MessageDialog( |
1202 | 1889 | self.live_installer, Gtk.DialogFlags.MODAL, | 1889 | self.live_installer, Gtk.DialogFlags.MODAL, |
1204 | 1890 | Gtk.MessageType.ERROR, Gtk.ButtonsType.OK, msg) | 1890 | Gtk.MessageType.ERROR, Gtk.ButtonsType.OK, "") |
1205 | 1891 | dialog.set_title(title) | 1891 | dialog.set_title(title) |
1206 | 1892 | dialog.set_markup(msg) | ||
1207 | 1893 | for label in dialog.get_message_area().get_children(): | ||
1208 | 1894 | if not isinstance(label, Gtk.Label): | ||
1209 | 1895 | continue | ||
1210 | 1896 | label.connect('activate-link', self.on_link_clicked) | ||
1211 | 1892 | dialog.run() | 1897 | dialog.run() |
1212 | 1893 | self.set_busy_cursor(saved_busy_cursor) | 1898 | self.set_busy_cursor(saved_busy_cursor) |
1213 | 1894 | dialog.hide() | 1899 | dialog.hide() |
1214 | 1895 | if fatal: | 1900 | if fatal: |
1215 | 1896 | self.return_to_partitioning() | 1901 | self.return_to_partitioning() |
1216 | 1897 | 1902 | ||
1217 | 1903 | def on_link_clicked(self, widget, uri): | ||
1218 | 1904 | misc.launch_uri(uri) | ||
1219 | 1905 | |||
1220 | 1898 | def toggle_grub_fail(self, unused_widget): | 1906 | def toggle_grub_fail(self, unused_widget): |
1221 | 1899 | if self.grub_no_new_device.get_active(): | 1907 | if self.grub_no_new_device.get_active(): |
1222 | 1900 | self.no_grub_warn.show() | 1908 | self.no_grub_warn.show() |
1223 | diff --git a/ubiquity/plugins/ubi-usersetup.py b/ubiquity/plugins/ubi-usersetup.py | |||
1224 | index 57f2a35..b61d74a 100644 | |||
1225 | --- a/ubiquity/plugins/ubi-usersetup.py | |||
1226 | +++ b/ubiquity/plugins/ubi-usersetup.py | |||
1227 | @@ -31,7 +31,7 @@ import re | |||
1228 | 31 | 31 | ||
1229 | 32 | import debconf | 32 | import debconf |
1230 | 33 | 33 | ||
1232 | 34 | from ubiquity import misc, plugin, validation | 34 | from ubiquity import i18n, misc, plugin, validation |
1233 | 35 | 35 | ||
1234 | 36 | 36 | ||
1235 | 37 | NAME = 'usersetup' | 37 | NAME = 'usersetup' |
1236 | @@ -146,6 +146,10 @@ class PageBase(plugin.PluginUI): | |||
1237 | 146 | def set_allow_password_empty(self, empty): | 146 | def set_allow_password_empty(self, empty): |
1238 | 147 | self.allow_password_empty = empty | 147 | self.allow_password_empty = empty |
1239 | 148 | 148 | ||
1240 | 149 | def plugin_translate(self, lang): | ||
1241 | 150 | self.hostname_error_text = i18n.get_string('hostname_error', lang) | ||
1242 | 151 | self.domain_connection_error_text = i18n.get_string('domain_connection_error', lang) | ||
1243 | 152 | |||
1244 | 149 | 153 | ||
1245 | 150 | class PageGtk(PageBase): | 154 | class PageGtk(PageBase): |
1246 | 151 | plugin_title = 'ubiquity/text/userinfo_heading_label' | 155 | plugin_title = 'ubiquity/text/userinfo_heading_label' |
1247 | @@ -186,6 +190,19 @@ class PageGtk(PageBase): | |||
1248 | 186 | self.password_ok = builder.get_object('password_ok') | 190 | self.password_ok = builder.get_object('password_ok') |
1249 | 187 | self.password_strength = builder.get_object('password_strength') | 191 | self.password_strength = builder.get_object('password_strength') |
1250 | 188 | 192 | ||
1251 | 193 | self.login_directory = builder.get_object('login_directory') | ||
1252 | 194 | self.login_directory_extra_label = builder.get_object('login_directory_extra_label') | ||
1253 | 195 | self.domain_name = builder.get_object('domain_name') | ||
1254 | 196 | self.domain_name_ok = builder.get_object('domain_name_ok') | ||
1255 | 197 | self.domain_name_error_label = builder.get_object('domain_name_error_label') | ||
1256 | 198 | self.domain_user = builder.get_object('domain_user') | ||
1257 | 199 | self.domain_user_ok = builder.get_object('domain_user_ok') | ||
1258 | 200 | self.domain_user_error_label = builder.get_object('domain_user_error_label') | ||
1259 | 201 | self.domain_passwd = builder.get_object('domain_passwd') | ||
1260 | 202 | self.directory_testbutton = builder.get_object('directory_testbutton') | ||
1261 | 203 | |||
1262 | 204 | self.userinfo_notebook = builder.get_object('userinfo_notebook') | ||
1263 | 205 | |||
1264 | 189 | # Dodgy hack to let us center the contents of the page without it | 206 | # Dodgy hack to let us center the contents of the page without it |
1265 | 190 | # moving as elements appear and disappear, specifically the full name | 207 | # moving as elements appear and disappear, specifically the full name |
1266 | 191 | # okay check icon and the hostname error messages. | 208 | # okay check icon and the hostname error messages. |
1267 | @@ -204,6 +221,11 @@ class PageGtk(PageBase): | |||
1268 | 204 | self.hostname_changed_id = self.hostname.connect( | 221 | self.hostname_changed_id = self.hostname.connect( |
1269 | 205 | 'changed', self.on_hostname_changed) | 222 | 'changed', self.on_hostname_changed) |
1270 | 206 | 223 | ||
1271 | 224 | if not os.path.exists('/usr/sbin/realm'): | ||
1272 | 225 | self.login_directory.hide() | ||
1273 | 226 | self.login_directory_extra_label.hide() | ||
1274 | 227 | self.login_directory_extra_label.set_sensitive(False) | ||
1275 | 228 | |||
1276 | 207 | if self.controller.oem_config: | 229 | if self.controller.oem_config: |
1277 | 208 | self.fullname.set_text('OEM Configuration (temporary user)') | 230 | self.fullname.set_text('OEM Configuration (temporary user)') |
1278 | 209 | self.fullname.set_editable(False) | 231 | self.fullname.set_editable(False) |
1279 | @@ -272,11 +294,41 @@ class PageGtk(PageBase): | |||
1280 | 272 | def set_hostname(self, value): | 294 | def set_hostname(self, value): |
1281 | 273 | self.hostname.set_text(value) | 295 | self.hostname.set_text(value) |
1282 | 274 | 296 | ||
1283 | 297 | def get_login_directory(self): | ||
1284 | 298 | """ Use a directory for authentication """ | ||
1285 | 299 | return self.login_directory.get_active() | ||
1286 | 300 | |||
1287 | 301 | def get_domain_name(self): | ||
1288 | 302 | """ Get the domain name """ | ||
1289 | 303 | return self.domain_name.get_text() | ||
1290 | 304 | |||
1291 | 305 | def get_domain_user(self): | ||
1292 | 306 | """ Get the domain name """ | ||
1293 | 307 | return self.domain_user.get_text() | ||
1294 | 308 | |||
1295 | 309 | def get_domain_passwd(self): | ||
1296 | 310 | """ Get the domain name """ | ||
1297 | 311 | return self.domain_passwd.get_text() | ||
1298 | 312 | |||
1299 | 313 | def domain_name_error(self, msg): | ||
1300 | 314 | self.domain_name_ok.hide() | ||
1301 | 315 | m = '<small><span foreground="darkred"><b>%s</b></span></small>' % msg | ||
1302 | 316 | self.domain_name_error_label.set_markup(m) | ||
1303 | 317 | self.domain_name_error_label.show() | ||
1304 | 318 | |||
1305 | 319 | def domain_user_error(self, msg): | ||
1306 | 320 | self.domain_user_ok.hide() | ||
1307 | 321 | m = '<small><span foreground="darkred"><b>%s</b></span></small>' % msg | ||
1308 | 322 | self.domain_user_error_label.set_markup(m) | ||
1309 | 323 | self.domain_user_error_label.show() | ||
1310 | 324 | |||
1311 | 275 | def clear_errors(self): | 325 | def clear_errors(self): |
1312 | 276 | self.username_error_label.hide() | 326 | self.username_error_label.hide() |
1313 | 277 | self.hostname_error_label.hide() | 327 | self.hostname_error_label.hide() |
1314 | 278 | self.password_error_label.hide() | 328 | self.password_error_label.hide() |
1315 | 279 | 329 | ||
1316 | 330 | self.domain_name_error_label.hide() | ||
1317 | 331 | |||
1318 | 280 | # Callback functions. | 332 | # Callback functions. |
1319 | 281 | 333 | ||
1320 | 282 | def info_loop(self, widget): | 334 | def info_loop(self, widget): |
1321 | @@ -380,8 +432,7 @@ class PageGtk(PageBase): | |||
1322 | 380 | except GLib.GError: | 432 | except GLib.GError: |
1323 | 381 | pass | 433 | pass |
1324 | 382 | else: | 434 | else: |
1327 | 383 | # FIXME: i18n | 435 | self.hostname_error(self.hostname_error_text) |
1326 | 384 | self.hostname_error('That name already exists on the network.') | ||
1328 | 385 | self.hostname_ok.hide() | 436 | self.hostname_ok.hide() |
1329 | 386 | 437 | ||
1330 | 387 | def hostname_timeout(self, widget): | 438 | def hostname_timeout(self, widget): |
1331 | @@ -407,6 +458,91 @@ class PageGtk(PageBase): | |||
1332 | 407 | else: | 458 | else: |
1333 | 408 | self.resolver_ok = False | 459 | self.resolver_ok = False |
1334 | 409 | 460 | ||
1335 | 461 | def validate_directory_info(self, widget=None): | ||
1336 | 462 | """ Validate domain information """ | ||
1337 | 463 | domain_name_is_valid = True | ||
1338 | 464 | domain_info_complete = True | ||
1339 | 465 | |||
1340 | 466 | domain_name_txt = self.domain_name.get_text().strip() | ||
1341 | 467 | domain_user_txt = self.domain_user.get_text() | ||
1342 | 468 | domain_passwd_txt = self.domain_passwd.get_text() | ||
1343 | 469 | |||
1344 | 470 | self.domain_name_ok.hide() | ||
1345 | 471 | if domain_name_txt: | ||
1346 | 472 | errors = check_hostname(domain_name_txt) | ||
1347 | 473 | if errors: | ||
1348 | 474 | self.domain_name_error(make_error_string(self.controller, errors)) | ||
1349 | 475 | domain_name_is_valid = False | ||
1350 | 476 | else: | ||
1351 | 477 | self.domain_name_error_label.hide() | ||
1352 | 478 | else: | ||
1353 | 479 | self.domain_name_error_label.hide() | ||
1354 | 480 | domain_name_is_valid = False | ||
1355 | 481 | self.directory_testbutton.set_sensitive(domain_name_is_valid) | ||
1356 | 482 | domain_info_complete = domain_name_is_valid | ||
1357 | 483 | |||
1358 | 484 | if domain_user_txt: | ||
1359 | 485 | # Don't enforce lower case for AD administrator. | ||
1360 | 486 | errors = check_username(domain_user_txt.lower()) | ||
1361 | 487 | if errors: | ||
1362 | 488 | self.domain_user_error(make_error_string(self.controller, errors)) | ||
1363 | 489 | domain_info_complete = False | ||
1364 | 490 | else: | ||
1365 | 491 | self.domain_user_ok.show() | ||
1366 | 492 | self.domain_user_error_label.hide() | ||
1367 | 493 | else: | ||
1368 | 494 | self.domain_user_ok.hide() | ||
1369 | 495 | self.domain_user_error_label.hide() | ||
1370 | 496 | domain_info_complete = False | ||
1371 | 497 | |||
1372 | 498 | if not domain_passwd_txt: | ||
1373 | 499 | domain_info_complete = False | ||
1374 | 500 | |||
1375 | 501 | self.controller.allow_go_forward(domain_info_complete) | ||
1376 | 502 | |||
1377 | 503 | def switch_userinfo_tab(self, tab): | ||
1378 | 504 | self.userinfo_notebook.set_current_page(tab) | ||
1379 | 505 | |||
1380 | 506 | if tab == 1: | ||
1381 | 507 | self.title = 'ubiquity/text/directory_information_title' | ||
1382 | 508 | self.controller.allow_go_backward(True) | ||
1383 | 509 | self.validate_directory_info() | ||
1384 | 510 | else: | ||
1385 | 511 | self.title = self.plugin_title | ||
1386 | 512 | self.controller.allow_go_backward(False) | ||
1387 | 513 | self.controller.allow_go_forward(True) | ||
1388 | 514 | |||
1389 | 515 | self.controller._wizard.set_page_title(self) | ||
1390 | 516 | |||
1391 | 517 | def plugin_set_online_state(self, state): | ||
1392 | 518 | if not state: | ||
1393 | 519 | self.login_directory.set_active(False) | ||
1394 | 520 | self.login_directory.set_sensitive(state) | ||
1395 | 521 | |||
1396 | 522 | def plugin_on_next_clicked(self): | ||
1397 | 523 | if self.userinfo_notebook.get_current_page() == 0 and self.get_login_directory(): | ||
1398 | 524 | self.switch_userinfo_tab(1) | ||
1399 | 525 | return True | ||
1400 | 526 | return False | ||
1401 | 527 | |||
1402 | 528 | def plugin_on_back_clicked(self): | ||
1403 | 529 | if self.userinfo_notebook.get_current_page() == 1: | ||
1404 | 530 | self.switch_userinfo_tab(0) | ||
1405 | 531 | return True | ||
1406 | 532 | return False | ||
1407 | 533 | |||
1408 | 534 | def on_testdomain_click(self, widget): | ||
1409 | 535 | if misc.execute('realm', 'discover', self.domain_name.get_text()): | ||
1410 | 536 | self.domain_name_ok.show() | ||
1411 | 537 | self.domain_name_error_label.hide() | ||
1412 | 538 | else: | ||
1413 | 539 | self.domain_name_ok.hide() | ||
1414 | 540 | self.domain_name_error(self.domain_connection_error_text) | ||
1415 | 541 | self.domain_name_error_label.show() | ||
1416 | 542 | |||
1417 | 543 | def on_login_directory_toggled(self, widget): | ||
1418 | 544 | self.login_directory_extra_label.set_sensitive(widget.get_active()) | ||
1419 | 545 | |||
1420 | 410 | 546 | ||
1421 | 411 | class PageKde(PageBase): | 547 | class PageKde(PageBase): |
1422 | 412 | plugin_breadcrumb = 'ubiquity/text/breadcrumb_user' | 548 | plugin_breadcrumb = 'ubiquity/text/breadcrumb_user' |
1423 | @@ -746,6 +882,13 @@ class Page(plugin.Plugin): | |||
1424 | 746 | else: | 882 | else: |
1425 | 747 | self.preseed('netcfg/get_domain', '') | 883 | self.preseed('netcfg/get_domain', '') |
1426 | 748 | 884 | ||
1427 | 885 | if hasattr(self.ui, 'get_login_directory'): | ||
1428 | 886 | self.preseed_bool('ubiquity/login_use_directory', self.ui.get_login_directory()) | ||
1429 | 887 | if self.ui.get_login_directory(): | ||
1430 | 888 | self.preseed('ubiquity/directory_domain', self.ui.get_domain_name()) | ||
1431 | 889 | self.preseed('ubiquity/directory_user', self.ui.get_domain_user()) | ||
1432 | 890 | self.preseed('ubiquity/directory_passwd', self.ui.get_domain_passwd()) | ||
1433 | 891 | |||
1434 | 749 | plugin.Plugin.ok_handler(self) | 892 | plugin.Plugin.ok_handler(self) |
1435 | 750 | 893 | ||
1436 | 751 | def error(self, priority, question): | 894 | def error(self, priority, question): |
Cheers. Looks mostly good code-wise, just a few small-ish comments/questions down there.
I'm going to also request a 'design' review from Matthew. (I guess that for this it would be appreciated if you could upload .debs somewhere maybe...)