[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb:[3172] addons/1.3/web_dbsetup/trunk/LedgerSMB/ Initiate.pm



Revision: 3172
          http://ledger-smb.svn.sourceforge.net/ledger-smb/?rev=3172&view=rev
Author:   einhverfr
Date:     2011-05-23 20:09:31 +0000 (Mon, 23 May 2011)

Log Message:
-----------
Ian's patch 2946711

Modified Paths:
--------------
    addons/1.3/web_dbsetup/trunk/LedgerSMB/Initiate.pm

Modified: addons/1.3/web_dbsetup/trunk/LedgerSMB/Initiate.pm
===================================================================
--- addons/1.3/web_dbsetup/trunk/LedgerSMB/Initiate.pm	2011-05-23 03:26:39 UTC (rev 3171)
+++ addons/1.3/web_dbsetup/trunk/LedgerSMB/Initiate.pm	2011-05-23 20:09:31 UTC (rev 3172)
@@ -344,6 +344,18 @@
         " VALUES ( (SELECT id FROM entity WHERE name = '" .
         $form->{admin_username} . "'), 'database', 'creator', NOW());\n";
 
+    # INSTALL says to add users to the entity_employee table and users that
+    # are not added do not appear in user searches, making them difficult
+    # to manage. But, are all users employees? Is it not reasonable that 
+    # some users, such as this admin user, is not an employee of the company
+    # represented by the database? Consider an accounting service provider
+    # where none of the employees of the service provider are employees
+    # of a customer's company yet they all need user account to manage
+    # the records of the company. IG
+    print PSQL "INSERT INTO entity_employee (entity_id, role)" .
+        " VALUES ( (SELECT id FROM entity WHERE name = '" .
+        $form->{admin_username} . "'), '" . $form->{admin_username} . "');\n";
+
     print PSQL "INSERT INTO users " .
         " (username, entity_id) " .
         " VALUES ( '" . $form->{admin_username} . "', " .


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.