[PC-BSD Commits] r1115 - pcbsd/branches/1.4/pcbsdusermanager

svn at pcbsd.org svn at pcbsd.org
Tue Jan 8 16:31:42 PST 2008


Author: tim
Date: 2008-01-08 16:31:41 -0800 (Tue, 08 Jan 2008)
New Revision: 1115

Modified:
   pcbsd/branches/1.4/pcbsdusermanager/maindlgcode.cpp
   pcbsd/branches/1.4/pcbsdusermanager/simpledlgcode.cpp
Log:
Applied changes from r1113 into 1.4 branch

Modified: pcbsd/branches/1.4/pcbsdusermanager/maindlgcode.cpp
===================================================================
--- pcbsd/branches/1.4/pcbsdusermanager/maindlgcode.cpp	2008-01-09 00:09:38 UTC (rev 1114)
+++ pcbsd/branches/1.4/pcbsdusermanager/maindlgcode.cpp	2008-01-09 00:31:41 UTC (rev 1115)
@@ -139,6 +139,9 @@
     
     //Disable certain form fields if the user is root, to stop changing of important fields
     enableEdits(user->getUid() != 0);
+    //Do not allow the removal of the currently logged in user
+    if (getenv("USER") == username) deleteButton->setEnabled(false);
+    
     QString uid = QString::number(user->getUid());
     if (uid == "-1") { uid = tr("New User"); }
     uidBox->setText(uid);

Modified: pcbsd/branches/1.4/pcbsdusermanager/simpledlgcode.cpp
===================================================================
--- pcbsd/branches/1.4/pcbsdusermanager/simpledlgcode.cpp	2008-01-09 00:09:38 UTC (rev 1114)
+++ pcbsd/branches/1.4/pcbsdusermanager/simpledlgcode.cpp	2008-01-09 00:31:41 UTC (rev 1115)
@@ -83,6 +83,10 @@
     fullnameBox->setText(user->getFullname());
     
     canAdminCheck->setChecked(wheel->isMember(user->getUsername()));
+    
+    //Do not allow the removal of the currently logged in user
+    removeUserBut->setEnabled(getenv("USER") != user->getUsername());
+    
     systemChange = false;
 }
 



More information about the Commits mailing list