/[gli]/branches/overhaul/src/fe/gtk/Users.py
Gentoo

Contents of /branches/overhaul/src/fe/gtk/Users.py

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1623 - (show annotations) (download) (as text)
Fri Jan 19 10:19:38 2007 UTC (7 years, 11 months ago) by agaffney
File MIME type: text/x-python
File size: 22675 byte(s)
remove Help button
rearrange Stage screen
1 # Copyright 1999-2005 Gentoo Foundation
2 # This source code is distributed under the terms of version 2 of the GNU
3 # General Public License as published by the Free Software Foundation, a copy
4 # of which can be found in the main directory of this project.
5
6 import gtk,gobject
7 import os
8 import re
9 import GLIScreen
10 from Widgets import Widgets
11 import GLIUtility
12
13 class Panel(GLIScreen.GLIScreen):
14 """
15 The Users section of the installer.
16
17 @author: John N. Laliberte <allanonjl@gentoo.org>
18 @license: GPL
19 """
20
21 # Attributes:
22 title="User Settings"
23 columns = []
24 users = []
25 current_users=[]
26 root_verified = False
27 _helptext = """
28 <b><u>Users</u></b>
29
30 Start off by setting the root password. This will be the root password on the
31 newly-installed system, *NOT* the Livecd. Type it again to verify, and then
32 click the Verify button to check your typing.
33
34 Once you have clicked Verify you can then click Add user to add a normal user.
35
36 Adding a User for Daily Use:
37
38 Working as root on a Unix/Linux system is dangerous and should be avoided as
39 much as possible. Therefore it is strongly recommended to add a user for
40 day-to-day use.
41
42 Enter the username and password in respective boxes. Make sure to type your
43 password carefully, it is not verified. All other fields are optional, but
44 setting groups is highly recommended.
45
46 The groups the user is member of define what activities the user can perform.
47 The following table lists a number of important groups you might wish to use:
48
49 <u>Group</u> <u>Description</u>
50 audio be able to access the audio devices
51 cdrom be able to directly access optical devices
52 floppy be able to directly access floppy devices
53 games be able to play games
54 portage be able to use emerge --pretend as a normal user
55 usb be able to access USB devices
56 plugdev Be able to mount and use pluggable devices such as cameras and USB sticks
57 video be able to access video capturing hardware and doing hardware acceleration
58 wheel be able to use su
59
60 Enter them in a comma-separated list in the groups box.
61
62 Optinally you may also specify the user's shell. The default is /bin/bash. If
63 you want to disable the user from logging in you can set it to /bin/false. You
64 can also specify the user's home directory (default is /home/username), userid
65 (default is the next available ID), and a comment describing the user.
66
67 Make sure to click Accept Changes to save the changes to your user. They will
68 then show up in the list.
69 """
70
71 def __init__(self,controller):
72 GLIScreen.GLIScreen.__init__(self, controller)
73
74 content_str = "User screen!"
75
76 vert = gtk.VBox(False, 0)
77 vert.set_border_width(10)
78
79 # setup the top box that data will be shown to the user in.
80 self.treedata = gtk.ListStore(gobject.TYPE_STRING,gobject.TYPE_STRING, gobject.TYPE_STRING,
81 gobject.TYPE_STRING, gobject.TYPE_STRING, gobject.TYPE_STRING,
82 gobject.TYPE_STRING)
83
84 self.treeview = gtk.TreeView(self.treedata)
85 self.treeview.connect("cursor-changed", self.selection_changed)
86 self.columns.append(gtk.TreeViewColumn("Username ", gtk.CellRendererText(), text=1))
87 self.columns.append(gtk.TreeViewColumn("Groups", gtk.CellRendererText(), text=2))
88 self.columns.append(gtk.TreeViewColumn("Shell ", gtk.CellRendererText(), text=3))
89 self.columns.append(gtk.TreeViewColumn("HomeDir ", gtk.CellRendererText(), text=4))
90 self.columns.append(gtk.TreeViewColumn("UserID", gtk.CellRendererText(), text=5))
91 self.columns.append(gtk.TreeViewColumn("Comment", gtk.CellRendererText(), text=6))
92 col_num = 0
93 for column in self.columns:
94 column.set_resizable(True)
95 column.set_sort_column_id(col_num)
96 self.treeview.append_column(column)
97 col_num += 1
98
99 self.treewindow = gtk.ScrolledWindow()
100 self.treewindow.set_size_request(-1, 125)
101 self.treewindow.set_shadow_type(gtk.SHADOW_IN)
102 self.treewindow.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)
103 self.treewindow.add(self.treeview)
104 #vert.pack_start(self.treewindow, expand=False, fill=False, padding=0)
105
106 # now add in the gtk.Notebook
107 self.notebook = gtk.Notebook()
108 self.notebook.set_tab_pos(gtk.POS_BOTTOM)
109 #notebook.set_size_request(-1, -1)
110 self.notebook.show()
111 self.notebook.set_show_tabs(False)
112 self.notebook.set_show_border(False)
113 #notebookshow_border = True
114
115 frame = gtk.Frame("")
116 frame.set_border_width(10)
117 frame.set_size_request(100, 75)
118 frame.show()
119
120 frame_vert = gtk.VBox(False,0)
121 hbox = gtk.HBox(False, 0)
122 #frame.add(frame_vert)
123
124 vbox = gtk.VBox(False,0)
125 # setup the action buttons
126 reset = gtk.Button("Root Password", stock=None)
127 reset.connect("clicked", self.root, "root")
128 reset.set_size_request(150, -1)
129 reset.show()
130 vbox.pack_start(reset, expand=False, fill=False, padding=5)
131
132 add = gtk.Button("Add user", stock=None)
133 add.connect("clicked", self.addu, "add")
134 add.set_size_request(150, -1)
135 add.show()
136 vbox.pack_start(add, expand=False, fill=False, padding=5)
137
138 delete = gtk.Button("Delete user", stock=None)
139 delete.connect("clicked", self.delete, "delete")
140 delete.set_size_request(150, -1)
141 delete.show()
142 vbox.pack_start(delete, expand=False, fill=False, padding=5)
143
144 hbox.pack_start(self.treewindow, expand=True, fill=True, padding=5)
145 hbox.pack_start(vbox, expand=False, fill=False, padding=5)
146
147 vert.pack_start(hbox, expand=False, fill=False, padding=0)
148
149 # setup the first page
150 frame_vert = gtk.VBox(False,0)
151
152 # three blank hboxes
153 hbox = gtk.HBox(False, 0)
154 label = gtk.Label("")
155 label.set_size_request(150, -1)
156 hbox.pack_start(label, expand=False, fill=False, padding=5)
157 frame_vert.add(hbox)
158 hbox = gtk.HBox(False, 0)
159 label = gtk.Label("")
160 label.set_size_request(150, -1)
161 hbox.pack_start(label, expand=False, fill=False, padding=5)
162 frame_vert.add(hbox)
163 hbox = gtk.HBox(False, 0)
164 label = gtk.Label("")
165 label.set_size_request(150, -1)
166 hbox.pack_start(label, expand=False, fill=False, padding=5)
167 frame_vert.add(hbox)
168
169 hbox = gtk.HBox(False, 0)
170 label = gtk.Label("Root Password")
171 label.set_size_request(150, -1)
172 hbox.pack_start(label, expand=False, fill=False, padding=5)
173 self.root1 = gtk.Entry()
174 self.root1.set_visibility(False)
175 self.root1.set_size_request(150, -1)
176 hbox.pack_start(self.root1, expand=False, fill=False, padding=5)
177 frame_vert.add(hbox)
178
179 hbox = gtk.HBox(False, 0)
180 label = gtk.Label("Verify Password")
181 label.set_size_request(150, -1)
182 label.show()
183 hbox.pack_start(label, expand=False, fill=False, padding=5)
184 self.root2 = gtk.Entry()
185 self.root2.set_visibility(False)
186 self.root2.set_size_request(150, -1)
187 hbox.pack_start(self.root2, expand=False, fill=False, padding=5)
188 verify = gtk.Button("Verify!")
189 verify.connect("clicked", self.verify_root_password, "delete")
190 verify.set_size_request(150, -1)
191 hbox.pack_start(verify, expand=False, fill=False, padding=5)
192 self.verified = gtk.Image()
193 self.verified.set_from_stock(gtk.STOCK_CANCEL, gtk.ICON_SIZE_SMALL_TOOLBAR)
194 hbox.pack_start(self.verified, expand=False, fill=False, padding=5)
195 frame_vert.add(hbox)
196
197 # two more blank hboxes
198 hbox = gtk.HBox(False, 0)
199 # reset button if they want to reset the root password
200 # loaded from a user profile
201 self.reset_pass2 = gtk.Button("Reset root password")
202 self.reset_pass2.connect("clicked", self.reset, "root")
203 self.reset_pass2.set_size_request(150, -1)
204 self.reset_pass2.set_sensitive(True)
205 fake_label=gtk.Label("")
206 fake_label.set_size_request(150,-1)
207 fake_label2=gtk.Label("")
208 fake_label2.set_size_request(150,-1)
209 hbox.pack_start(fake_label, expand=False, fill=False, padding=5)
210 hbox.pack_start(fake_label2, expand=False, fill=False, padding=5)
211 hbox.pack_start(self.reset_pass2, expand=False, fill=False, padding=5)
212 frame_vert.add(hbox)
213 hbox = gtk.HBox(False, 0)
214 label = gtk.Label("")
215 label.set_size_request(150, -1)
216 hbox.pack_start(label, expand=False, fill=False, padding=5)
217 frame_vert.add(hbox)
218 label = gtk.Label("Please Setup Your Root Password")
219 self.notebook.append_page(frame_vert, label)
220
221 # setup the second page
222 frame_vert = gtk.VBox(False,0)
223 self.user = {}
224
225 hbox = gtk.HBox(False, 0)
226 label = gtk.Label("Username")
227 label.set_size_request(300, -1)
228 hbox.pack_start(label, expand=False, fill=False, padding=5)
229 self.username = gtk.Entry()
230 self.user['username'] = self.username
231 self.username.set_size_request(150, -1)
232 self.username.set_name("username")
233 hbox.pack_start(self.username, expand=False, fill=False, padding=5)
234 frame_vert.add(hbox)
235
236 hbox = gtk.HBox(False, 0)
237 label = gtk.Label("Password")
238 label.set_size_request(300, -1)
239 hbox.pack_start(label, expand=False, fill=False, padding=5)
240 self.password = gtk.Entry()
241 self.user['password'] = self.password
242 self.password.set_size_request(150, -1)
243 self.password.set_name("password")
244 self.password.set_visibility(False)
245 hbox.pack_start(self.password, expand=False, fill=False, padding=5)
246 # reset button if they want to reset a user password that was
247 # loaded from a user profile
248 self.reset_pass = gtk.Button("Reset loaded password")
249 self.reset_pass.connect("clicked", self.reset_userpass_from_profile, "reset loaded pass")
250 self.reset_pass.set_size_request(150, 5)
251 self.reset_pass.set_sensitive(False)
252 hbox.pack_start(self.reset_pass, expand=False, fill=False, padding=5)
253 frame_vert.add(hbox)
254
255 hbox = gtk.HBox(False, 0)
256 label = gtk.Label("Groups")
257 label.set_size_request(300, -1)
258 hbox.pack_start(label, expand=False, fill=False, padding=5)
259 self.groups = gtk.Entry()
260 self.user['groups'] = self.groups
261 self.groups.set_size_request(150, -1)
262 self.groups.set_name("groups")
263 hbox.pack_start(self.groups, expand=False, fill=False, padding=5)
264 frame_vert.add(hbox)
265
266 hbox = gtk.HBox(False, 0)
267 label = gtk.Label("Shell")
268 label.set_size_request(300, -1)
269 hbox.pack_start(label, expand=False, fill=False, padding=5)
270 self.shell = gtk.Entry()
271 self.user['shell'] = self.shell
272 self.shell.set_size_request(150, -1)
273 self.shell.set_name("shell")
274 hbox.pack_start(self.shell, expand=False, fill=False, padding=5)
275 frame_vert.add(hbox)
276
277 hbox = gtk.HBox(False, 0)
278 label = gtk.Label("HomeDir")
279 label.set_size_request(300, -1)
280 hbox.pack_start(label, expand=False, fill=False, padding=5)
281 self.homedir = gtk.Entry()
282 self.user['homedir'] = self.homedir
283 self.homedir.set_size_request(150, -1)
284 self.homedir.set_name("homedir")
285 hbox.pack_start(self.homedir, expand=False, fill=False, padding=5)
286 frame_vert.add(hbox)
287
288 hbox = gtk.HBox(False, 0)
289 label = gtk.Label("UserID")
290 label.set_size_request(300, -1)
291 hbox.pack_start(label, expand=False, fill=False, padding=5)
292 self.userid = gtk.Entry()
293 self.user['userid'] = self.userid
294 self.userid.set_size_request(150, -1)
295 self.userid.set_name("userid")
296 hbox.pack_start(self.userid, expand=False, fill=False, padding=5)
297 frame_vert.add(hbox)
298
299 hbox = gtk.HBox(False, 0)
300 label = gtk.Label("Comment")
301 label.set_size_request(300, -1)
302 hbox.pack_start(label, expand=False, fill=False, padding=5)
303 self.comment = gtk.Entry()
304 self.user['comment'] = self.comment
305 self.comment.set_size_request(150, -1)
306 self.comment.set_name("comment")
307 hbox.pack_start(self.comment, expand=False, fill=False, padding=5)
308 button = gtk.Button("Accept Changes")
309 button.connect("clicked", self.add_edit_user, "add/edit user")
310 button.set_size_request(150, -1)
311 hbox.pack_start(button, expand=False, fill=False, padding=5)
312 frame_vert.add(hbox)
313
314 label = gtk.Label("Add/Edit a user")
315 self.notebook.append_page(frame_vert, label)
316
317 # add a blank page
318 frame_vert = gtk.VBox(False,0)
319 label = gtk.Label("Blank page")
320
321 self.notebook.append_page(frame_vert, label)
322
323 vert.pack_start(self.notebook, expand=False, fill=False, padding=50)
324 self.add_content(vert)
325
326
327 def selection_changed(self, treeview, data=None):
328 treeselection = treeview.get_selection()
329 treemodel, treeiter = treeselection.get_selected()
330 self.edit(treemodel,treeiter)
331 #row = treemodel.get(treeiter, 0)
332 #print row
333
334 def reset(self, widget, data=None):
335 # enable the boxen
336 self.root_verified=False
337 self.root1.set_sensitive(True)
338 self.root2.set_sensitive(True)
339 self.root1.set_text("")
340 self.root2.set_text("")
341 self.verified.set_from_stock(gtk.STOCK_CANCEL, gtk.ICON_SIZE_SMALL_TOOLBAR)
342 # blank the password in the installprofile
343 # this allows detection to reset the hash
344 self.controller.install_profile.set_root_pass_hash(None,"",None)
345 self.blank_the_boxes()
346 self.notebook.set_current_page(0)
347
348 def root(self,widget, data=None):
349 # select the root notebook page.
350 self.notebook.set_current_page(0)
351
352 def addu(self,widget, data=None):
353 self.blank_the_boxes()
354 self.password.set_sensitive(True)
355 # select that page
356 self.notebook.set_current_page(1)
357
358 def edit(self, treemodel=None,treeiter=None):
359 self.blank_the_boxes()
360 # retrieve the selected stuff from the treeview
361 #treeselection = self.treeview.get_selection()
362 #treemodel, treeiter = treeselection.get_selected()
363
364 # if theres something selected, need to show the details
365 if treeiter != None:
366 data={}
367 data["password"],data["username"],data["groups"],data["shell"],\
368 data["homedir"],data["userid"],data["comment"] = \
369 treemodel.get(treeiter, 0,1,2,3,4,5,6)
370
371 # fill the current entries
372 for entry_box in self.user:
373 box=self.user[entry_box]
374 box.set_text(data[box.get_name()])
375
376 # if the user was loaded from a profile, disable password box, and enable button
377 if self.is_user_from_stored_profile(data["username"]):
378 self.reset_pass.set_sensitive(True)
379 self.password.set_sensitive(False)
380 else:
381 # if not from a profile, enable password box, disable reset button
382 self.reset_pass.set_sensitive(False)
383 self.password.set_sensitive(True)
384
385 # show the edit box
386 self.notebook.set_current_page(1)
387
388 def delete(self, widget, data=None):
389 self.blank_the_boxes()
390 self.notebook.set_current_page(2)
391 self.delete_user()
392
393 def add_edit_user(self, widget, data=None):
394 # retrieve the entered data
395 data={}
396 for entry_box in self.user:
397 box=self.user[entry_box]
398 data[box.get_name()] = box.get_text()
399
400 success = self.add_user(data)
401
402 # if it was successful, blank the current entries and
403 # ensure password box is sensitive
404 if success == True:
405 self.blank_the_boxes()
406 self.password.set_sensitive(True)
407
408 def add_user(self,data):
409 return_val = False
410
411 # test to make sure uid is an INT!!!
412 if data["userid"] != "":
413 test = False
414 try:
415 uid_test = int(data["userid"])
416 test = True
417 except:
418 # its not an integer, raise the exception.
419 msgbox=Widgets().error_Box("Error","UID must be an integer, and you entered a string!")
420 msgbox.run()
421 msgbox.destroy()
422 else:
423 test = True
424
425 if self.is_data_empty(data) and test==True:
426 # now add it to the box
427 # ( <user name>, <password hash>, (<tuple of groups>), <shell>,
428 # <home directory>, <user id>, <user comment> )
429
430 # if they were previously added, modify them
431 if self.is_in_treeview(data['username']):
432 list = self.find_iter(data)
433 self.treedata.set(list[data['username']],0,data["password"],
434 1,data['username'],
435 2,data["groups"],
436 3,data["shell"],
437 4,data["homedir"],
438 5,data["userid"],
439 6,data["comment"]
440 )
441 else:
442 self.treedata.append([data["password"],data["username"], data["groups"],
443 data["shell"], data["homedir"],
444 data["userid"], data["comment"]])
445 #self.current_users.append(data['username'])
446 return_val=True
447
448 return return_val
449
450 def delete_user(self):
451 # get which one is selected
452 treeselection = self.treeview.get_selection()
453 treemodel, treeiter = treeselection.get_selected()
454 # if something is selected, remove it!
455 if treeiter != None:
456 row = treemodel.get(treeiter, 1)
457
458 # remove it from the current_users
459 #self.current_users.remove(row[0])
460
461 # remove it from the profile
462 self.controller.install_profile.remove_user(row[0])
463
464 # remove it from the treeview
465 iter = self.treedata.remove(treeiter)
466
467 def verify_root_password(self, widget, data=None):
468 if self.root1.get_text() == self.root2.get_text() and self.root1.get_text()!="":
469 # passwords match!
470 self.root_verified = True
471 # disable the boxen
472 self.root1.set_sensitive(False)
473 self.root2.set_sensitive(False)
474 self.verified.set_from_stock(gtk.STOCK_APPLY, gtk.ICON_SIZE_SMALL_TOOLBAR)
475 else:
476 # password's don't match.
477 msgbox=Widgets().error_Box("Error","Passwords do not match! ( or they are blank )")
478 msgbox.run()
479 msgbox.destroy()
480
481 def blank_the_boxes(self):
482 # blank the current entries
483 for entry_box in self.user:
484 box=self.user[entry_box]
485 box.set_text("")
486
487 def reset_userpass_from_profile(self, widget, data=None):
488 # need to remove the user from the loaded profile
489 # so that it will hash the password
490 self.controller.install_profile.remove_user(self.username.get_text())
491 self.users_from_profile.remove(self.username.get_text())
492 # make the button sensitive again
493 self.reset_pass.set_sensitive(False)
494 self.password.set_sensitive(True)
495 # clear the password box
496 self.password.set_text("")
497
498 def is_data_empty(self,data):
499 value = True
500 for item in data:
501 # if any of the items are blank, return False!
502 if item == "":
503 value = False
504
505 return value
506
507 def is_user_from_stored_profile(self,username):
508 value = False
509 users = self.controller.install_profile.get_users()
510 for user in users:
511 if user[0] == username:
512 value = True
513 return value
514
515 def is_root_pass_set(self):
516 value = False
517 pass_hash = self.controller.install_profile.get_root_pass_hash()
518 if pass_hash != "":
519 # its set!
520 value = True
521
522 return value
523
524 def is_in_treeview(self,username):
525 value = False
526 # if the username appears in the treestore, display error
527 username_list = self.get_treeview_usernames()
528 if username in username_list:
529 value = True
530
531 return value
532
533 def find_iter(self,data):
534 data_stor = {}
535 treeiter = self.treedata.get_iter_first()
536
537 while treeiter != None:
538 username = self.treedata.get_value(treeiter, 1)
539 if username == data["username"]:
540 data_stor[username]=treeiter
541 treeiter = self.treedata.iter_next(treeiter)
542
543 return data_stor
544
545 def get_treeview_usernames(self):
546 data = []
547 treeiter = self.treedata.get_iter_first()
548
549 while treeiter != None:
550 data.append(self.treedata.get_value(treeiter, 1))
551 treeiter = self.treedata.iter_next(treeiter)
552
553 return data
554
555 def get_treeview_data(self):
556 data = []
557 treeiter = self.treedata.get_iter_first()
558
559 while treeiter !=None:
560 user = self.treedata.get_value(treeiter,1)
561 passwd = self.treedata.get_value(treeiter,0)
562
563 # if the user was loaded from a profile, do NOT
564 # hash the password, but carry it through
565 if user not in self.users_from_profile:
566 pass_hash = GLIUtility.hash_password(passwd)
567 else:
568 pass_hash = passwd
569
570 groups = self.treedata.get_value(treeiter,2)
571 shell = self.treedata.get_value(treeiter,3)
572 homedir = self.treedata.get_value(treeiter,4)
573 userid = self.treedata.get_value(treeiter,5)
574 comment = self.treedata.get_value(treeiter,6)
575 try:
576 group_tuple = tuple(groups.split(","))
577 except:
578 # must be only 1 group
579 group_tuple = (groups)
580
581 data.append([user,pass_hash,group_tuple,shell,homedir,userid,comment])
582 treeiter = self.treedata.iter_next(treeiter)
583
584 return data
585
586 def activate(self):
587 self.controller.SHOW_BUTTON_EXIT = True
588 # self.controller.SHOW_BUTTON_HELP = True
589 self.controller.SHOW_BUTTON_BACK = True
590 self.controller.SHOW_BUTTON_FORWARD = True
591 self.controller.SHOW_BUTTON_FINISH = False
592
593 self.users_from_profile = [] # This structure can be taken out
594 self.users_iprofile = self.controller.install_profile.get_users()
595
596 # load the saved users
597 for user in self.users_iprofile:
598 groups = ",".join(user[2])
599
600 # if the uid field is blank, it will be set to None.
601 if user[5] == None:
602 # it is a tuple, so we have to thaw it and re-harden.
603 user_temp = list(user)
604 user_temp[5]=""
605 user = tuple(user_temp)
606
607 self.add_user({'password':user[1], 'username':user[0], 'groups':groups,
608 'shell':user[3], 'homedir':user[4],
609 'userid':user[5], 'comment':user[6]})
610 # add them to the list so we know it was loaded from the profile
611 # to pass the hash through ( this can be taken out and replaced )
612 self.users_from_profile.append(user[0])
613
614 # determine if root password is set, if so, automatically say its verified,
615 # load the hash into both boxes, change icon to green check, and disable the boxes.
616 if self.is_root_pass_set():
617 self.root_verified=True
618 self.verified.set_from_stock(gtk.STOCK_APPLY, gtk.ICON_SIZE_SMALL_TOOLBAR)
619 hash = self.controller.install_profile.get_root_pass_hash()
620 self.root1.set_text(hash)
621 self.root2.set_text(hash)
622 self.root1.set_sensitive(False)
623 self.root2.set_sensitive(False)
624
625
626 def deactivate(self):
627 # store everything
628 if (self.root_verified):
629
630 if self.is_root_pass_set():
631 # don't hash the password, just store it
632 root_hash = self.root1.get_text()
633 else:
634 # hash the password
635 root_hash = GLIUtility.hash_password(self.root1.get_text())
636
637 # store the root password
638 self.controller.install_profile.set_root_pass_hash(None,root_hash,None)
639
640 # now store all the entered users
641 #( <user name>, <password hash>, (<tuple of groups>), <shell>,
642 # <home directory>, <user id>, <user comment> )
643 # retrieve everything
644 data = self.get_treeview_data()
645
646 stored_users = []
647 # get the array of stored usernames
648 for item in list(self.controller.install_profile.get_users()):
649 stored_users.append(item[0])
650
651 for user in data:
652 if user[0] not in self.current_users and user[0] not in stored_users:
653 # user is not in stored profile, and hasn't been previously added
654 self.controller.install_profile.add_user(None, (user[0], user[1], user[2], user[3], user[4], user[5], user[6]), None)
655 #self.current_users.append(user[0])
656 elif user[0] in stored_users:
657 # user is in stored profile, need to remove, then readd the user
658 self.controller.install_profile.remove_user(user[0])
659 self.controller.install_profile.add_user(None, (user[0], user[1], user[2], user[3], user[4], user[5], user[6]), None)
660 #self.current_users.append(user[0])
661
662 return True
663 else:
664 msgbox=Widgets().error_Box("Error","You have not verified your root password!")
665 msgbox.run()
666 msgbox.destroy()

Properties

Name Value
svn:eol-style native

  ViewVC Help
Powered by ViewVC 1.1.20