I'm not aware of any logic like that which exists, and I hope there isn't any.

A UserLogin could have a null partyId for a variety of reasons, not just 
because it is the system user. Users can access the system with having a Party.

The proper way to check if a user is a system user it so use the 
UserLogin.isSystem indicator.

-David


Hans Bakker wrote:
Hi David,

are you sure this is the right way to go? I can imagine there are parts
of the system that check the userLogin.partyId and when not null (so: a
real user) use this party for certain things. That has to be changed
everywhere from 'null' to 'system'.

.....

regards,
Hans


On Sat, 2007-08-04 at 01:22 +0000, [EMAIL PROTECTED] wrote:
Author: jonesde
Date: Fri Aug  3 18:22:32 2007
New Revision: 562640

URL: http://svn.apache.org/viewvc?view=rev&rev=562640
Log:
Added Party for system user so that the system user can be used for more 
automated processes as intended

Modified:
    ofbiz/trunk/framework/security/data/SecurityData.xml

Modified: ofbiz/trunk/framework/security/data/SecurityData.xml
URL: 
http://svn.apache.org/viewvc/ofbiz/trunk/framework/security/data/SecurityData.xml?view=diff&rev=562640&r1=562639&r2=562640
==============================================================================
--- ofbiz/trunk/framework/security/data/SecurityData.xml (original)
+++ ofbiz/trunk/framework/security/data/SecurityData.xml Fri Aug  3 18:22:32 
2007
@@ -33,7 +33,9 @@
     <SecurityGroupPermission groupId="VIEWADMIN" permissionId="OFBTOOLS_VIEW"/>
     <SecurityGroupPermission groupId="BIZADMIN" permissionId="OFBTOOLS_VIEW"/>
- <!-- System UserLogin Account -->
-    <UserLogin userLoginId="system" enabled="N" isSystem="Y"/>
+    <!-- System UserLogin Account - with a Party just in case logic depends on it 
-->
+    <Party partyId="system" partyTypeId="PERSON"/>
+    <Person partyId="system" firstName="System" lastName="Account"/>
+    <UserLogin userLoginId="system" partyId="system" enabled="N" isSystem="Y"/>
     <UserLoginSecurityGroup groupId="FULLADMIN" userLoginId="system" 
fromDate="2001-01-01 12:00:00.0"/>
 </entity-engine-xml>




Reply via email to