Users - Security groups - error adding user login

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
bjc
Reply | Threaded
Open this post in threaded view
|

Users - Security groups - error adding user login

bjc
I got the error you can see below while trying to add my new Employee  
party to the Security Group "BIZADMIN".  This seems to indicate a  
lookup table needs a record and isn't getting it in time to satisfy  
Derby.

This is an out-of-the-SVN-box install with no real custom mods as of  
yet.  I'm just trying to figure out how much admin interface people  
get when they have various permissions, but it's hard if I can't  
assign them to security groups.  That is, unless I'm completely  
missing the point, which is always possible.

Any help would be, well... helpful.  I think it's probably a need for  
a service injected between the initiating action and the offending  
service to write the lookup table record.  Any light you can shed on  
whether this guess is out to lunch would also help... is it a deeper  
problem at the entity engine level, or am I on the right track?

Thanks much,

   Ben

ERROR: Could not complete the Add UserLogin To SecurityGroup [file:/
home/bjc/sandbox/ofbiz/applications/securityext/script/org/ofbiz/
securityext/securitygroup/
SecurityGroupServices.xml#addUserLoginToSecurityGroup] process  
[problem creating the newEntity value: Exception while inserting the  
following entity: [GenericEntity:UserLoginSecurityGroup][createdStamp,
2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp,
2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16  
04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)]
[lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)]
[lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)]
[thruDate,null()][userLoginId,10030(java.lang.String)] (while  
inserting: [GenericEntity:UserLoginSecurityGroup][createdStamp,
2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp,
2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16  
04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)]
[lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)]
[lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)]
[thruDate,null()][userLoginId,10030(java.lang.String)] (SQL Exception  
while executing the following:INSERT INTO  
OFBIZ.USER_LOGIN_SECURITY_GROUP (USER_LOGIN_ID, GROUP_ID, FROM_DATE,  
THRU_DATE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,  
CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table  
'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key  
constraint 'USER_SECGRP_USER' for key (10030). The statement has been  
rolled back.)))]
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Security groups - error adding user login

David E. Jones

Ben,

This is something that should certainly work out of the box without requiring anything fancy.

It appears in this case that the database is saying that the userLoginId of 10030 is not valid, or does not exist.

-David


Benjamin Cox wrote:

> I got the error you can see below while trying to add my new Employee  
> party to the Security Group "BIZADMIN".  This seems to indicate a  
> lookup table needs a record and isn't getting it in time to satisfy  
> Derby.
>
> This is an out-of-the-SVN-box install with no real custom mods as of  
> yet.  I'm just trying to figure out how much admin interface people  
> get when they have various permissions, but it's hard if I can't  
> assign them to security groups.  That is, unless I'm completely  
> missing the point, which is always possible.
>
> Any help would be, well... helpful.  I think it's probably a need for  
> a service injected between the initiating action and the offending  
> service to write the lookup table record.  Any light you can shed on  
> whether this guess is out to lunch would also help... is it a deeper  
> problem at the entity engine level, or am I on the right track?
>
> Thanks much,
>
>    Ben
>
> ERROR: Could not complete the Add UserLogin To SecurityGroup [file:/
> home/bjc/sandbox/ofbiz/applications/securityext/script/org/ofbiz/
> securityext/securitygroup/
> SecurityGroupServices.xml#addUserLoginToSecurityGroup] process  
> [problem creating the newEntity value: Exception while inserting the  
> following entity: [GenericEntity:UserLoginSecurityGroup][createdStamp,
> 2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp,
> 2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16  
> 04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)]
> [lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)]
> [lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)]
> [thruDate,null()][userLoginId,10030(java.lang.String)] (while  
> inserting: [GenericEntity:UserLoginSecurityGroup][createdStamp,
> 2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp,
> 2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16  
> 04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)]
> [lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)]
> [lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)]
> [thruDate,null()][userLoginId,10030(java.lang.String)] (SQL Exception  
> while executing the following:INSERT INTO  
> OFBIZ.USER_LOGIN_SECURITY_GROUP (USER_LOGIN_ID, GROUP_ID, FROM_DATE,  
> THRU_DATE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,  
> CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table  
> 'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key  
> constraint 'USER_SECGRP_USER' for key (10030). The statement has been  
> rolled back.)))]
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Security groups - error adding user login

Jacopo Cappellato
In reply to this post by bjc
Hi Benjamin,

my guess is that you have created the new party (10030) but you have not
created a user login for it.
You can create user logins for parties from the party detail page.
Then you have to associate permissions to the party login id, not to the
party id to which the login is associated.

Jacopo


Benjamin Cox wrote:

> I got the error you can see below while trying to add my new Employee  
> party to the Security Group "BIZADMIN".  This seems to indicate a  
> lookup table needs a record and isn't getting it in time to satisfy  
> Derby.
>
> This is an out-of-the-SVN-box install with no real custom mods as of  
> yet.  I'm just trying to figure out how much admin interface people  
> get when they have various permissions, but it's hard if I can't  
> assign them to security groups.  That is, unless I'm completely  
> missing the point, which is always possible.
>
> Any help would be, well... helpful.  I think it's probably a need for  
> a service injected between the initiating action and the offending  
> service to write the lookup table record.  Any light you can shed on  
> whether this guess is out to lunch would also help... is it a deeper  
> problem at the entity engine level, or am I on the right track?
>
> Thanks much,
>
>    Ben
>
> ERROR: Could not complete the Add UserLogin To SecurityGroup [file:/
> home/bjc/sandbox/ofbiz/applications/securityext/script/org/ofbiz/
> securityext/securitygroup/
> SecurityGroupServices.xml#addUserLoginToSecurityGroup] process  
> [problem creating the newEntity value: Exception while inserting the  
> following entity: [GenericEntity:UserLoginSecurityGroup][createdStamp,
> 2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp,
> 2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16  
> 04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)]
> [lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)]
> [lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)]
> [thruDate,null()][userLoginId,10030(java.lang.String)] (while  
> inserting: [GenericEntity:UserLoginSecurityGroup][createdStamp,
> 2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp,
> 2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16  
> 04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)]
> [lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)]
> [lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)]
> [thruDate,null()][userLoginId,10030(java.lang.String)] (SQL Exception  
> while executing the following:INSERT INTO  
> OFBIZ.USER_LOGIN_SECURITY_GROUP (USER_LOGIN_ID, GROUP_ID, FROM_DATE,  
> THRU_DATE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,  
> CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table  
> 'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key  
> constraint 'USER_SECGRP_USER' for key (10030). The statement has been  
> rolled back.)))]
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
>

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
bjc
Reply | Threaded
Open this post in threaded view
|

Re: Users - Security groups - error adding user login

bjc
Jacopo,

Thanks for trying, but unfortunately your guess is incorrect.  I did set up a user login, and even logged in a few times, before trying to associate the new permissions.  I ultimately was able to make it work by doing it from the User Login -> Security screen, but the buglet in my original approach could probably stand further investigation.  I'm probably not effective enough at ofbiz debugging just yet to volunteer, I'm afraid... that is, not without some guidance :-)

David - to your point, I'm sure the ID is a valid one, but whether of the right entity I'm not sure.  Could I perhaps have been entering the party ID when it needed a User Login ID or something?

Thank you both for responding,

  Ben

---
HotWax Media (www.hotwaxmedia.com)
Ben Cox
Director of Technology

On Mar 17, 2006, at 2:02 AM, Jacopo Cappellato wrote:

Hi Benjamin,

my guess is that you have created the new party (10030) but you have not 
created a user login for it.
You can create user logins for parties from the party detail page.
Then you have to associate permissions to the party login id, not to the 
party id to which the login is associated.

Jacopo


Benjamin Cox wrote:
I got the error you can see below while trying to add my new Employee  
party to the Security Group "BIZADMIN".  This seems to indicate a  
lookup table needs a record and isn't getting it in time to satisfy  
Derby.

This is an out-of-the-SVN-box install with no real custom mods as of  
yet.  I'm just trying to figure out how much admin interface people  
get when they have various permissions, but it's hard if I can't  
assign them to security groups.  That is, unless I'm completely  
missing the point, which is always possible.

Any help would be, well... helpful.  I think it's probably a need for  
a service injected between the initiating action and the offending  
service to write the lookup table record.  Any light you can shed on  
whether this guess is out to lunch would also help... is it a deeper  
problem at the entity engine level, or am I on the right track?

Thanks much,

   Ben

ERROR: Could not complete the Add UserLogin To SecurityGroup [file:/ 
home/bjc/sandbox/ofbiz/applications/securityext/script/org/ofbiz/ 
securityext/securitygroup/ 
SecurityGroupServices.xml#addUserLoginToSecurityGroup] process  
[problem creating the newEntity value: Exception while inserting the  
following entity: [GenericEntity:UserLoginSecurityGroup][createdStamp, 
2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp, 
2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16  
04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)] 
[lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)] 
[lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)] 
[thruDate,null()][userLoginId,10030(java.lang.String)] (while  
inserting: [GenericEntity:UserLoginSecurityGroup][createdStamp, 
2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp, 
2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16  
04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)] 
[lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)] 
[lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)] 
[thruDate,null()][userLoginId,10030(java.lang.String)] (SQL Exception  
while executing the following:INSERT INTO  
OFBIZ.USER_LOGIN_SECURITY_GROUP (USER_LOGIN_ID, GROUP_ID, FROM_DATE,  
THRU_DATE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,  
CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table  
'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key  
constraint 'USER_SECGRP_USER' for key (10030). The statement has been  
rolled back.)))]

_______________________________________________
Users mailing list



_______________________________________________
Users mailing list


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Security groups - error adding user login

David E. Jones

As Jacopo mentioned if you entered a partyId there then is would not work, it must be a userLoginId. These are usually not numeric values (sequenced) like the partyId, so Jacopo is probably right: you entered the partyId instead of a userLoginId.

-David


Benjamin Cox wrote:

> Jacopo,
>
> Thanks for trying, but unfortunately your guess is incorrect.  I did set
> up a user login, and even logged in a few times, before trying to
> associate the new permissions.  I ultimately was able to make it work by
> doing it from the User Login -> Security screen, but the buglet in my
> original approach could probably stand further investigation.  I'm
> probably not effective enough at ofbiz debugging just yet to volunteer,
> I'm afraid... that is, not without some guidance :-)
>
> David - to your point, I'm sure the ID is a valid one, but whether of
> the right entity I'm not sure.  Could I perhaps have been entering the
> party ID when it needed a User Login ID or something?
>
> Thank you both for responding,
>
>   Ben
>
> ---
> HotWax Media (www.hotwaxmedia.com <http://www.hotwaxmedia.com>)
> Ben Cox
> Director of Technology
>
> On Mar 17, 2006, at 2:02 AM, Jacopo Cappellato wrote:
>
>> Hi Benjamin,
>>
>> my guess is that you have created the new party (10030) but you have not
>> created a user login for it.
>> You can create user logins for parties from the party detail page.
>> Then you have to associate permissions to the party login id, not to the
>> party id to which the login is associated.
>>
>> Jacopo
>>
>>
>> Benjamin Cox wrote:
>>> I got the error you can see below while trying to add my new Employee  
>>> party to the Security Group "BIZADMIN".  This seems to indicate a  
>>> lookup table needs a record and isn't getting it in time to satisfy  
>>> Derby.
>>>
>>> This is an out-of-the-SVN-box install with no real custom mods as of  
>>> yet.  I'm just trying to figure out how much admin interface people  
>>> get when they have various permissions, but it's hard if I can't  
>>> assign them to security groups.  That is, unless I'm completely  
>>> missing the point, which is always possible.
>>>
>>> Any help would be, well... helpful.  I think it's probably a need for  
>>> a service injected between the initiating action and the offending  
>>> service to write the lookup table record.  Any light you can shed on  
>>> whether this guess is out to lunch would also help... is it a deeper  
>>> problem at the entity engine level, or am I on the right track?
>>>
>>> Thanks much,
>>>
>>>    Ben
>>>
>>> ERROR: Could not complete the Add UserLogin To SecurityGroup [file:/
>>> home/bjc/sandbox/ofbiz/applications/securityext/script/org/ofbiz/
>>> securityext/securitygroup/
>>> SecurityGroupServices.xml#addUserLoginToSecurityGroup] process  
>>> [problem creating the newEntity value: Exception while inserting the  
>>> following entity: [GenericEntity:UserLoginSecurityGroup][createdStamp,
>>> 2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp,
>>> 2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16  
>>> 04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)]
>>> [lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)]
>>> [lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)]
>>> [thruDate,null()][userLoginId,10030(java.lang.String)] (while  
>>> inserting: [GenericEntity:UserLoginSecurityGroup][createdStamp,
>>> 2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp,
>>> 2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16  
>>> 04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)]
>>> [lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)]
>>> [lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)]
>>> [thruDate,null()][userLoginId,10030(java.lang.String)] (SQL Exception  
>>> while executing the following:INSERT INTO  
>>> OFBIZ.USER_LOGIN_SECURITY_GROUP (USER_LOGIN_ID, GROUP_ID, FROM_DATE,  
>>> THRU_DATE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,  
>>> CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table  
>>> 'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key  
>>> constraint 'USER_SECGRP_USER' for key (10030). The statement has been  
>>> rolled back.)))]
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email] <mailto:[hidden email]>
>>> http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email] <mailto:[hidden email]>
>> http://lists.ofbiz.org/mailman/listinfo/users
>
>
> ------------------------------------------------------------------------
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
bjc
Reply | Threaded
Open this post in threaded view
|

Re: Users - Security groups - error adding user login

bjc
Indeed he was right - I misinterpreted the second bit there... sorry Jacopo!   It works + no buglet = my bad ;-)

  Ben

---
HotWax Media (www.hotwaxmedia.com)
Ben Cox
Director of Technology
831.372.7098

"Reality is that which, when you stop believing in it, does not go away."  - Philip K. Dick


On Mar 17, 2006, at 2:47 PM, David E. Jones wrote:


As Jacopo mentioned if you entered a partyId there then is would not work, it must be a userLoginId. These are usually not numeric values (sequenced) like the partyId, so Jacopo is probably right: you entered the partyId instead of a userLoginId.

-David


Benjamin Cox wrote:
Jacopo,

Thanks for trying, but unfortunately your guess is incorrect.  I did set 
up a user login, and even logged in a few times, before trying to 
associate the new permissions.  I ultimately was able to make it work by 
doing it from the User Login -> Security screen, but the buglet in my 
original approach could probably stand further investigation.  I'm 
probably not effective enough at ofbiz debugging just yet to volunteer, 
I'm afraid... that is, not without some guidance :-)

David - to your point, I'm sure the ID is a valid one, but whether of 
the right entity I'm not sure.  Could I perhaps have been entering the 
party ID when it needed a User Login ID or something?

Thank you both for responding,

  Ben

---
Ben Cox
Director of Technology

On Mar 17, 2006, at 2:02 AM, Jacopo Cappellato wrote:

Hi Benjamin,

my guess is that you have created the new party (10030) but you have not 
created a user login for it.
You can create user logins for parties from the party detail page.
Then you have to associate permissions to the party login id, not to the 
party id to which the login is associated.

Jacopo


Benjamin Cox wrote:
I got the error you can see below while trying to add my new Employee  
party to the Security Group "BIZADMIN".  This seems to indicate a  
lookup table needs a record and isn't getting it in time to satisfy  
Derby.

This is an out-of-the-SVN-box install with no real custom mods as of  
yet.  I'm just trying to figure out how much admin interface people  
get when they have various permissions, but it's hard if I can't  
assign them to security groups.  That is, unless I'm completely  
missing the point, which is always possible.

Any help would be, well... helpful.  I think it's probably a need for  
a service injected between the initiating action and the offending  
service to write the lookup table record.  Any light you can shed on  
whether this guess is out to lunch would also help... is it a deeper  
problem at the entity engine level, or am I on the right track?

Thanks much,

   Ben

ERROR: Could not complete the Add UserLogin To SecurityGroup [file:/ 
home/bjc/sandbox/ofbiz/applications/securityext/script/org/ofbiz/ 
securityext/securitygroup/ 
SecurityGroupServices.xml#addUserLoginToSecurityGroup] process  
[problem creating the newEntity value: Exception while inserting the  
following entity: [GenericEntity:UserLoginSecurityGroup][createdStamp, 
2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp, 
2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16  
04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)] 
[lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)] 
[lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)] 
[thruDate,null()][userLoginId,10030(java.lang.String)] (while  
inserting: [GenericEntity:UserLoginSecurityGroup][createdStamp, 
2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp, 
2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16  
04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)] 
[lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)] 
[lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)] 
[thruDate,null()][userLoginId,10030(java.lang.String)] (SQL Exception  
while executing the following:INSERT INTO  
OFBIZ.USER_LOGIN_SECURITY_GROUP (USER_LOGIN_ID, GROUP_ID, FROM_DATE,  
THRU_DATE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,  
CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table  
'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key  
constraint 'USER_SECGRP_USER' for key (10030). The statement has been  
rolled back.)))]

_______________________________________________
Users mailing list



_______________________________________________
Users mailing list


------------------------------------------------------------------------


_______________________________________________
Users mailing list

_______________________________________________
Users mailing list


 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Security groups - error adding user login

Ian Gilbert-2
In reply to this post by bjc
I've been meaning to comment on this mail for some time.  I was wondering how people use the
different parties, particularly in relation to each other?  For example a given company party may
have employees who might be customers as well.  I can understand how these would be set up using
relationships but was wondering if there was a situation where a 'company' might have a login and
what scenarios this might occur in?  Would it be more appropriate to create new persons and they
would then have access to the companies information?  I guess what I'm asking is rather than
having the ability to create a user login id for the company would it be better practise to
allocate this capability to a user (or users)?  I attach a screenshot of the page that I'm talking
about.  Since a 'company' isn't a person it can't really login although it could have orders,
roles, etc., which need to be tracked.  If there is only one login available (which this screen
seems to suggest) then ordering is made difficult (it has to be either done centrally or the login
needs to be shared).  If the customer creates their own account then there is no way of working
out how much the company may have bought in total.

Or is this dealt with by relationships as well?  Could anyone share their experiences in relation
to this?

My reason is that we have historically all of our customers have had 'personal' accounts and they
purchased using these.  We have recently been approached by larger, multi departmental
organisations who want to amalgamate all their purchasing (getting better discounts) but want the
actual purchasing to be handled by discrete units (without a shared login).  It seems likely that
this functionality is available immediately but I am unsure how to implement it.

Thanks and very best wishes

Ian


On Fri, March 17, 2006 22:58, Benjamin Cox wrote:

> Jacopo,
>
>
> Thanks for trying, but unfortunately your guess is incorrect.  I did
> set up a user login, and even logged in a few times, before trying to associate the new
> permissions.  I ultimately was able to make it work by doing it from the User Login -> Security
> screen, but the buglet in my original approach could probably stand further investigation.  I'm
> probably not effective enough at ofbiz debugging just yet to volunteer, I'm afraid... that is, not
> without some guidance :-)
>
> David - to your point, I'm sure the ID is a valid one, but whether of
> the right entity I'm not sure.  Could I perhaps have been entering the party ID when it needed a
> User Login ID or something?
>
>
> Thank you both for responding,
>
>
> Ben
>
>
> ---
> HotWax Media (www.hotwaxmedia.com)
> Ben Cox
> Director of Technology
>
>
> On Mar 17, 2006, at 2:02 AM, Jacopo Cappellato wrote:
>
>
>> Hi Benjamin,
>>
>>
>> my guess is that you have created the new party (10030) but you have not created a user login for
>> it. You can create user logins for parties from the party detail page.
>> Then you have to associate permissions to the party login id, not
>> to the party id to which the login is associated.
>>
>> Jacopo
>>
>>
>>
>> Benjamin Cox wrote:
>>
>>> I got the error you can see below while trying to add my new Employee
>>> party to the Security Group "BIZADMIN".  This seems to indicate a lookup table needs a record
>>> and isn't getting it in time to satisfy Derby.
>>>
>>>
>>> This is an out-of-the-SVN-box install with no real custom mods as of
>>> yet.  I'm just trying to figure out how much admin interface people get when they have various
>>> permissions, but it's hard if I can't assign them to security groups.  That is, unless I'm
>>> completely missing the point, which is always possible.
>>>
>>> Any help would be, well... helpful.  I think it's probably a need for
>>> a service injected between the initiating action and the offending service to write the lookup
>>> table record.  Any light you can shed on whether this guess is out to lunch would also help...
>>> is it a deeper problem at the entity engine level, or am I on the right track?
>>>
>>> Thanks much,
>>>
>>>
>>> Ben
>>>
>>>
>>> ERROR: Could not complete the Add UserLogin To SecurityGroup [file:/
>>> home/bjc/sandbox/ofbiz/applications/securityext/script/org/ofbiz/ securityext/securitygroup/
>>> SecurityGroupServices.xml#addUserLoginToSecurityGroup] process
>>> [problem creating the newEntity value: Exception while inserting the
>>> following entity: [GenericEntity:UserLoginSecurityGroup] [createdStamp,
>>> 2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp,
>>> 2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16
>>> 04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)]
>>> [lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)]
>>> [lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)]
>>> [thruDate,null()][userLoginId,10030(java.lang.String)] (while
>>> inserting: [GenericEntity:UserLoginSecurityGroup][createdStamp,
>>> 2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp,
>>> 2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16
>>> 04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)]
>>> [lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)]
>>> [lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)]
>>> [thruDate,null()][userLoginId,10030(java.lang.String)] (SQL Exception
>>> while executing the following:INSERT INTO OFBIZ.USER_LOGIN_SECURITY_GROUP (USER_LOGIN_ID,
>>> GROUP_ID, FROM_DATE,
>>> THRU_DATE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,
>>> CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table
>>> 'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key
>>> constraint 'USER_SECGRP_USER' for key (10030). The statement has been rolled back.)))]
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>>
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/users
>>
>
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users

--
Ian Gilbert
www.ethicalshopper.net
Fair trade: the alternative choice for your everyday shopping
0845 456 2429

WHAT DO YOU DRINK AT WORK?
We can supply your organisation with high quality fair trade tea and
coffee.  Discounts are available for regular orders.  Contact us for more
details.
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users

CompanyLogin.png (11K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Users - Security groups - error adding user login

David E. Jones

Ian,

For internal users I'd recommend never having a UserLogin for a PartyGroup. This is for security reasons and such, and in fact many security policies (even enforced by bigger company service providers or governments) it is required that each person has and uses their own login account.

For customers you certainly could have a company (PartyGroup) with a UserLogin, but if you want different employees or agents to be able to purchase for the company and keep track of things both separately and collectively then the best option is to create a BillingAccount for the company and associate other users with it, or use the customer agent relationship (there is demo seed data for this).

Of course, this assumes a pretty recent version of OFBiz. In older versions there wasn't much for this.

-David



Ian Gilbert wrote:

> I've been meaning to comment on this mail for some time.  I was wondering how people use the
> different parties, particularly in relation to each other?  For example a given company party may
> have employees who might be customers as well.  I can understand how these would be set up using
> relationships but was wondering if there was a situation where a 'company' might have a login and
> what scenarios this might occur in?  Would it be more appropriate to create new persons and they
> would then have access to the companies information?  I guess what I'm asking is rather than
> having the ability to create a user login id for the company would it be better practise to
> allocate this capability to a user (or users)?  I attach a screenshot of the page that I'm talking
> about.  Since a 'company' isn't a person it can't really login although it could have orders,
> roles, etc., which need to be tracked.  If there is only one login available (which this screen
> seems to suggest) then ordering is made difficult (it has to be either done centrally or the login
> needs to be shared).  If the customer creates their own account then there is no way of working
> out how much the company may have bought in total.
>
> Or is this dealt with by relationships as well?  Could anyone share their experiences in relation
> to this?
>
> My reason is that we have historically all of our customers have had 'personal' accounts and they
> purchased using these.  We have recently been approached by larger, multi departmental
> organisations who want to amalgamate all their purchasing (getting better discounts) but want the
> actual purchasing to be handled by discrete units (without a shared login).  It seems likely that
> this functionality is available immediately but I am unsure how to implement it.
>
> Thanks and very best wishes
>
> Ian
>
>
> On Fri, March 17, 2006 22:58, Benjamin Cox wrote:
>> Jacopo,
>>
>>
>> Thanks for trying, but unfortunately your guess is incorrect.  I did
>> set up a user login, and even logged in a few times, before trying to associate the new
>> permissions.  I ultimately was able to make it work by doing it from the User Login -> Security
>> screen, but the buglet in my original approach could probably stand further investigation.  I'm
>> probably not effective enough at ofbiz debugging just yet to volunteer, I'm afraid... that is, not
>> without some guidance :-)
>>
>> David - to your point, I'm sure the ID is a valid one, but whether of
>> the right entity I'm not sure.  Could I perhaps have been entering the party ID when it needed a
>> User Login ID or something?
>>
>>
>> Thank you both for responding,
>>
>>
>> Ben
>>
>>
>> ---
>> HotWax Media (www.hotwaxmedia.com)
>> Ben Cox
>> Director of Technology
>>
>>
>> On Mar 17, 2006, at 2:02 AM, Jacopo Cappellato wrote:
>>
>>
>>> Hi Benjamin,
>>>
>>>
>>> my guess is that you have created the new party (10030) but you have not created a user login for
>>> it. You can create user logins for parties from the party detail page.
>>> Then you have to associate permissions to the party login id, not
>>> to the party id to which the login is associated.
>>>
>>> Jacopo
>>>
>>>
>>>
>>> Benjamin Cox wrote:
>>>
>>>> I got the error you can see below while trying to add my new Employee
>>>> party to the Security Group "BIZADMIN".  This seems to indicate a lookup table needs a record
>>>> and isn't getting it in time to satisfy Derby.
>>>>
>>>>
>>>> This is an out-of-the-SVN-box install with no real custom mods as of
>>>> yet.  I'm just trying to figure out how much admin interface people get when they have various
>>>> permissions, but it's hard if I can't assign them to security groups.  That is, unless I'm
>>>> completely missing the point, which is always possible.
>>>>
>>>> Any help would be, well... helpful.  I think it's probably a need for
>>>> a service injected between the initiating action and the offending service to write the lookup
>>>> table record.  Any light you can shed on whether this guess is out to lunch would also help...
>>>> is it a deeper problem at the entity engine level, or am I on the right track?
>>>>
>>>> Thanks much,
>>>>
>>>>
>>>> Ben
>>>>
>>>>
>>>> ERROR: Could not complete the Add UserLogin To SecurityGroup [file:/
>>>> home/bjc/sandbox/ofbiz/applications/securityext/script/org/ofbiz/ securityext/securitygroup/
>>>> SecurityGroupServices.xml#addUserLoginToSecurityGroup] process
>>>> [problem creating the newEntity value: Exception while inserting the
>>>> following entity: [GenericEntity:UserLoginSecurityGroup] [createdStamp,
>>>> 2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp,
>>>> 2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16
>>>> 04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)]
>>>> [lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)]
>>>> [lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)]
>>>> [thruDate,null()][userLoginId,10030(java.lang.String)] (while
>>>> inserting: [GenericEntity:UserLoginSecurityGroup][createdStamp,
>>>> 2006-03-17 04:43:05.519(java.sql.Timestamp)][createdTxStamp,
>>>> 2006-03-17 04:43:05.487(java.sql.Timestamp)][fromDate,2006-03-16
>>>> 04:42:35.38(java.sql.Timestamp)][groupId,BIZADMIN(java.lang.String)]
>>>> [lastUpdatedStamp,2006-03-17 04:43:05.519(java.sql.Timestamp)]
>>>> [lastUpdatedTxStamp,2006-03-17 04:43:05.487(java.sql.Timestamp)]
>>>> [thruDate,null()][userLoginId,10030(java.lang.String)] (SQL Exception
>>>> while executing the following:INSERT INTO OFBIZ.USER_LOGIN_SECURITY_GROUP (USER_LOGIN_ID,
>>>> GROUP_ID, FROM_DATE,
>>>> THRU_DATE, LAST_UPDATED_STAMP, LAST_UPDATED_TX_STAMP, CREATED_STAMP,
>>>> CREATED_TX_STAMP) VALUES (?, ?, ?, ?, ?, ?, ?, ?) (INSERT on table
>>>> 'USER_LOGIN_SECURITY_GROUP' caused a violation of foreign key
>>>> constraint 'USER_SECGRP_USER' for key (10030). The statement has been rolled back.)))]
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> [hidden email]
>>>> http://lists.ofbiz.org/mailman/listinfo/users
>>>>
>>>>
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.ofbiz.org/mailman/listinfo/users
>>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/users
>
>
>
> ------------------------------------------------------------------------
>
>
> ------------------------------------------------------------------------
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users