Add UserLogin to Security Group error

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

Add UserLogin to Security Group error

ChristopherJ
Hi all

The following error message is displayed when I try to manually add a user
to a security group.



And if I use the search option for users this message comes in to view.



Cheers

Fedora 10
Svn 732624
Reply | Threaded
Open this post in threaded view
|

Re: Add UserLogin to Security Group error

Karim Rahimpur
Hi Christopher,

It seems you're mistaking a PartyId for a UserLogin. You have to create
a UserLogin for your Party and use that. E.g. you have a Party whose
PartyId=10010, create a UserLogin for that Party and assign it to the
security group. You can also create several UserLogins for a Party, just
as in the demo, the Party with PartyId admin has several UserLogins:
https://demo.hotwaxmedia.com/partymgr/control/viewprofile?partyId=admin

Regards,
Karim


ChristopherJ wrote:

> Hi all
>
> The following error message is displayed when I try to manually add a user
> to a security group.
>
> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bman.jpeg 
>
> And if I use the search option for users this message comes in to view.
>
> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bsearch.jpeg 
>
> Cheers
>
> Fedora 10
> Svn 732624
>  
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.176 / Virus Database: 270.10.4/1880 - Release Date: 07/01/2009 8:49
>
>  
Reply | Threaded
Open this post in threaded view
|

Re: Add UserLogin to Security Group error

ChristopherJ
Thanks Karim

I see what you mean by using ChristopherJ instead of 10010(partyID)
it adds the security group correctly to that particular userlogon.
I now understand why the user logon ID is used instead of the party
ID because of multiple userlogons for the same partyID.


OK First Problem solved (user in front of my keyboard)

The second problem is when searching for a userlogon under the security
group of your choice (as illustrated by the second image in my first post).
The same problem occurs on the demo hotwax server.
   


 
Karim Rahimpur wrote
Hi Christopher,

It seems you're mistaking a PartyId for a UserLogin. You have to create
a UserLogin for your Party and use that. E.g. you have a Party whose
PartyId=10010, create a UserLogin for that Party and assign it to the
security group. You can also create several UserLogins for a Party, just
as in the demo, the Party with PartyId admin has several UserLogins:
https://demo.hotwaxmedia.com/partymgr/control/viewprofile?partyId=admin

Regards,
Karim


ChristopherJ wrote:
> Hi all
>
> The following error message is displayed when I try to manually add a user
> to a security group.
>
> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bman.jpeg 
>
> And if I use the search option for users this message comes in to view.
>
> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bsearch.jpeg 
>
> Cheers
>
> Fedora 10
> Svn 732624
>  
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.176 / Virus Database: 270.10.4/1880 - Release Date: 07/01/2009 8:49
>
>  
Reply | Threaded
Open this post in threaded view
|

Re: Add UserLogin to Security Group error

Jacques Le Roux
Administrator
In reply to this post by Karim Rahimpur
More about security in OFBiz
http://docs.ofbiz.org/display/OFBTECH/OFBiz+security

Jacques

From: "Karim Rahimpur" <[hidden email]>

> Hi Christopher,
>
> It seems you're mistaking a PartyId for a UserLogin. You have to create
> a UserLogin for your Party and use that. E.g. you have a Party whose
> PartyId=10010, create a UserLogin for that Party and assign it to the
> security group. You can also create several UserLogins for a Party, just
> as in the demo, the Party with PartyId admin has several UserLogins:
> https://demo.hotwaxmedia.com/partymgr/control/viewprofile?partyId=admin
>
> Regards,
> Karim
>
>
> ChristopherJ wrote:
>> Hi all
>>
>> The following error message is displayed when I try to manually add a user
>> to a security group.
>>
>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bman.jpeg 
>>
>> And if I use the search option for users this message comes in to view.
>>
>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bsearch.jpeg 
>>
>> Cheers
>>
>> Fedora 10
>> Svn 732624
>>  
>> ------------------------------------------------------------------------
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com 
>> Version: 8.0.176 / Virus Database: 270.10.4/1880 - Release Date: 07/01/2009 8:49
>>
>>  
>
Reply | Threaded
Open this post in threaded view
|

Re: Add UserLogin to Security Group error

Karim Rahimpur
In reply to this post by ChristopherJ
Christopher,

For the second problem you mention, there should be a bug waiting to be
resolved ;-)
However, you can type in and add the UserLogin if you know it.

ChristopherJ wrote:

> Thanks Karim
>
> I see what you mean by using ChristopherJ instead of 10010(partyID)
> it adds the security group correctly to that particular userlogon.
> I now understand why the user logon ID is used instead of the party
> ID because of multiple userlogons for the same partyID.
>
>
> OK First Problem solved (user in front of my keyboard)
>
> The second problem is when searching for a userlogon under the security
> group of your choice (as illustrated by the second image in my first post).
> The same problem occurs on the demo hotwax server.
>    
>
>
>  
>
> Karim Rahimpur wrote:
>  
>> Hi Christopher,
>>
>> It seems you're mistaking a PartyId for a UserLogin. You have to create
>> a UserLogin for your Party and use that. E.g. you have a Party whose
>> PartyId=10010, create a UserLogin for that Party and assign it to the
>> security group. You can also create several UserLogins for a Party, just
>> as in the demo, the Party with PartyId admin has several UserLogins:
>> https://demo.hotwaxmedia.com/partymgr/control/viewprofile?partyId=admin
>>
>> Regards,
>> Karim
>>
>>
>> ChristopherJ wrote:
>>    
>>> Hi all
>>>
>>> The following error message is displayed when I try to manually add a
>>> user
>>> to a security group.
>>>
>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bman.jpeg 
>>>
>>> And if I use the search option for users this message comes in to view.
>>>
>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bsearch.jpeg 
>>>
>>> Cheers
>>>
>>> Fedora 10
>>> Svn 732624
>>>  
>>> ------------------------------------------------------------------------
>>>
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG - http://www.avg.com 
>>> Version: 8.0.176 / Virus Database: 270.10.4/1880 - Release Date:
>>> 07/01/2009 8:49
>>>
>>>  
>>>      
>>    
>
>  
> ------------------------------------------------------------------------
>
>
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com 
> Version: 8.0.176 / Virus Database: 270.10.4/1880 - Release Date: 07/01/2009 8:49
>
>  
Reply | Threaded
Open this post in threaded view
|

Re: Add UserLogin to Security Group error

ChristopherJ
Thanks Karim for the input hope it gets resolved soon it would make
things alot easier!  

and thanks Jacques the article you suggested was quiet a read.

 
Reply | Threaded
Open this post in threaded view
|

Re: Add UserLogin to Security Group error

Jacques Le Roux
Administrator
In reply to this post by Karim Rahimpur
Yes, there is a problem somewhere, if you replace
  <set field="entityName" value="UserLoginAndPartyDetails"/>
by
  <set field="entityName2" value="UserLoginAndPartyDetails"/>
in  <screen name="LookupUserLoginAndPartyDetails">

(and of course in FindLookUp.groovy) you have a workaround. Please open a Jira issue for this, as it's a deeper bug that should be
solved
http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices

Thanks

Jacques

From: "Karim Rahimpur" <[hidden email]>

> Christopher,
>
> For the second problem you mention, there should be a bug waiting to be
> resolved ;-)
> However, you can type in and add the UserLogin if you know it.
>
> ChristopherJ wrote:
>> Thanks Karim
>>
>> I see what you mean by using ChristopherJ instead of 10010(partyID)
>> it adds the security group correctly to that particular userlogon.
>> I now understand why the user logon ID is used instead of the party
>> ID because of multiple userlogons for the same partyID.
>>
>>
>> OK First Problem solved (user in front of my keyboard)
>>
>> The second problem is when searching for a userlogon under the security
>> group of your choice (as illustrated by the second image in my first post).
>> The same problem occurs on the demo hotwax server.
>>
>>
>>
>>
>>
>> Karim Rahimpur wrote:
>>
>>> Hi Christopher,
>>>
>>> It seems you're mistaking a PartyId for a UserLogin. You have to create
>>> a UserLogin for your Party and use that. E.g. you have a Party whose
>>> PartyId=10010, create a UserLogin for that Party and assign it to the
>>> security group. You can also create several UserLogins for a Party, just
>>> as in the demo, the Party with PartyId admin has several UserLogins:
>>> https://demo.hotwaxmedia.com/partymgr/control/viewprofile?partyId=admin
>>>
>>> Regards,
>>> Karim
>>>
>>>
>>> ChristopherJ wrote:
>>>
>>>> Hi all
>>>>
>>>> The following error message is displayed when I try to manually add a
>>>> user
>>>> to a security group.
>>>>
>>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bman.jpeg
>>>>
>>>> And if I use the search option for users this message comes in to view.
>>>>
>>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bsearch.jpeg
>>>>
>>>> Cheers
>>>>
>>>> Fedora 10
>>>> Svn 732624
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> No virus found in this incoming message.
>>>> Checked by AVG - http://www.avg.com
>>>> Version: 8.0.176 / Virus Database: 270.10.4/1880 - Release Date:
>>>> 07/01/2009 8:49
>>>>
>>>>
>>>>
>>>
>>
>>
>> ------------------------------------------------------------------------
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com
>> Version: 8.0.176 / Virus Database: 270.10.4/1880 - Release Date: 07/01/2009 8:49
>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Add UserLogin to Security Group error

Jacques Le Roux
Administrator
In reply to this post by ChristopherJ
Please don't use this as a *real* workaround, since if you change FindLookUp.groovy you will have to change all <set
field="entityName" in lookup screens !!!

Jacques

From: "Jacques Le Roux" <[hidden email]>

> Yes, there is a problem somewhere, if you replace
>  <set field="entityName" value="UserLoginAndPartyDetails"/>
> by
>  <set field="entityName2" value="UserLoginAndPartyDetails"/>
> in  <screen name="LookupUserLoginAndPartyDetails">
>
> (and of course in FindLookUp.groovy) you have a workaround. Please open a Jira issue for this, as it's a deeper bug that should be
> solved
> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>
> Thanks
>
> Jacques
>
> From: "Karim Rahimpur" <[hidden email]>
>
>> Christopher,
>>
>> For the second problem you mention, there should be a bug waiting to be
>> resolved ;-)
>> However, you can type in and add the UserLogin if you know it.
>>
>> ChristopherJ wrote:
>>> Thanks Karim
>>>
>>> I see what you mean by using ChristopherJ instead of 10010(partyID)
>>> it adds the security group correctly to that particular userlogon.
>>> I now understand why the user logon ID is used instead of the party
>>> ID because of multiple userlogons for the same partyID.
>>>
>>>
>>> OK First Problem solved (user in front of my keyboard)
>>>
>>> The second problem is when searching for a userlogon under the security
>>> group of your choice (as illustrated by the second image in my first post).
>>> The same problem occurs on the demo hotwax server.
>>>
>>>
>>>
>>>
>>>
>>> Karim Rahimpur wrote:
>>>
>>>> Hi Christopher,
>>>>
>>>> It seems you're mistaking a PartyId for a UserLogin. You have to create
>>>> a UserLogin for your Party and use that. E.g. you have a Party whose
>>>> PartyId=10010, create a UserLogin for that Party and assign it to the
>>>> security group. You can also create several UserLogins for a Party, just
>>>> as in the demo, the Party with PartyId admin has several UserLogins:
>>>> https://demo.hotwaxmedia.com/partymgr/control/viewprofile?partyId=admin
>>>>
>>>> Regards,
>>>> Karim
>>>>
>>>>
>>>> ChristopherJ wrote:
>>>>
>>>>> Hi all
>>>>>
>>>>> The following error message is displayed when I try to manually add a
>>>>> user
>>>>> to a security group.
>>>>>
>>>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bman.jpeg
>>>>>
>>>>> And if I use the search option for users this message comes in to view.
>>>>>
>>>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bsearch.jpeg
>>>>>
>>>>> Cheers
>>>>>
>>>>> Fedora 10
>>>>> Svn 732624
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>>
>>>>> No virus found in this incoming message.
>>>>> Checked by AVG - http://www.avg.com
>>>>> Version: 8.0.176 / Virus Database: 270.10.4/1880 - Release Date:
>>>>> 07/01/2009 8:49
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> No virus found in this incoming message.
>>> Checked by AVG - http://www.avg.com
>>> Version: 8.0.176 / Virus Database: 270.10.4/1880 - Release Date: 07/01/2009 8:49
>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Add UserLogin to Security Group error

Jacques Le Roux
Administrator
The error seems to come from expandString in  FlexibleStringExpander.java[110]. It seems that this.strElems should not be null there
or this.orig is wrong. I will try to dig in this afternoon. I think that this problem is more general than the occurence you found.

Jacques

From: "Jacques Le Roux" <[hidden email]>

> Please don't use this as a *real* workaround, since if you change FindLookUp.groovy you will have to change all <set
> field="entityName" in lookup screens !!!
>
> Jacques
>
> From: "Jacques Le Roux" <[hidden email]>
>> Yes, there is a problem somewhere, if you replace
>>  <set field="entityName" value="UserLoginAndPartyDetails"/>
>> by
>>  <set field="entityName2" value="UserLoginAndPartyDetails"/>
>> in  <screen name="LookupUserLoginAndPartyDetails">
>>
>> (and of course in FindLookUp.groovy) you have a workaround. Please open a Jira issue for this, as it's a deeper bug that should
>> be solved
>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices
>>
>> Thanks
>>
>> Jacques
>>
>> From: "Karim Rahimpur" <[hidden email]>
>>
>>> Christopher,
>>>
>>> For the second problem you mention, there should be a bug waiting to be
>>> resolved ;-)
>>> However, you can type in and add the UserLogin if you know it.
>>>
>>> ChristopherJ wrote:
>>>> Thanks Karim
>>>>
>>>> I see what you mean by using ChristopherJ instead of 10010(partyID)
>>>> it adds the security group correctly to that particular userlogon.
>>>> I now understand why the user logon ID is used instead of the party
>>>> ID because of multiple userlogons for the same partyID.
>>>>
>>>>
>>>> OK First Problem solved (user in front of my keyboard)
>>>>
>>>> The second problem is when searching for a userlogon under the security
>>>> group of your choice (as illustrated by the second image in my first post).
>>>> The same problem occurs on the demo hotwax server.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> Karim Rahimpur wrote:
>>>>
>>>>> Hi Christopher,
>>>>>
>>>>> It seems you're mistaking a PartyId for a UserLogin. You have to create
>>>>> a UserLogin for your Party and use that. E.g. you have a Party whose
>>>>> PartyId=10010, create a UserLogin for that Party and assign it to the
>>>>> security group. You can also create several UserLogins for a Party, just
>>>>> as in the demo, the Party with PartyId admin has several UserLogins:
>>>>> https://demo.hotwaxmedia.com/partymgr/control/viewprofile?partyId=admin
>>>>>
>>>>> Regards,
>>>>> Karim
>>>>>
>>>>>
>>>>> ChristopherJ wrote:
>>>>>
>>>>>> Hi all
>>>>>>
>>>>>> The following error message is displayed when I try to manually add a
>>>>>> user
>>>>>> to a security group.
>>>>>>
>>>>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bman.jpeg
>>>>>>
>>>>>> And if I use the search option for users this message comes in to view.
>>>>>>
>>>>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bsearch.jpeg
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>> Fedora 10
>>>>>> Svn 732624
>>>>>>
>>>>>> ------------------------------------------------------------------------
>>>>>>
>>>>>>
>>>>>> No virus found in this incoming message.
>>>>>> Checked by AVG - http://www.avg.com
>>>>>> Version: 8.0.176 / Virus Database: 270.10.4/1880 - Release Date:
>>>>>> 07/01/2009 8:49
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>
>>>>
>>>> ------------------------------------------------------------------------
>>>>
>>>>
>>>> No virus found in this incoming message.
>>>> Checked by AVG - http://www.avg.com
>>>> Version: 8.0.176 / Virus Database: 270.10.4/1880 - Release Date: 07/01/2009 8:49
>>>>
>>>>
>>>
>>
>

Reply | Threaded
Open this post in threaded view
|

Re: Add UserLogin to Security Group error

Karim Rahimpur
Hi Jacques,

I've looked into this, and tried out the following:

In LookupForms.xml :

  replaced two lines reading:

    <set field="entityName" value="entityName"/>

  with:

    <set field="entityName" value="UserLoginAndPartyDetails"/>

There are two forms defined in LookupForms.xml where this occurs:

- listLookupPartyAndUserLoginAndPerson
- listLookupUserLoginAndPartyDetails

After that, e.g. from the order manager where you create a new order,
the UserLogin lookup works fine (at least to the point where you find
and select a UserLogin).
Also e.g.
https://127.0.0.1:8443/partymgr/control/EditSecurityGroupUserLogins?groupId=CATALOGADMIN 
works fine searching and selecting the UserLogin.

I've tried this on my current copy which is not updated to the latest
svn trunk, but I've looked at the latest LookupForms.xml and those lines
(line 218 and 248) are just the same.

I don't know about the FlexibleStringExpander, but I think the above
could be the solution, at least I think that those lines reading "<set
field="entityName" value="entityName"/>" surely are wrong, don't you?

If you agree, I'll create a Jira issue and supply a patch later on.

Regards,
Karim

> The error seems to come from expandString in  
> FlexibleStringExpander.java[110]. It seems that this.strElems should
> not be null there
> or this.orig is wrong. I will try to dig in this afternoon. I think
> that this problem is more general than the occurence you found.
>
> Jacques
>
> From: "Jacques Le Roux" <[hidden email]>
>> Please don't use this as a *real* workaround, since if you change
>> FindLookUp.groovy you will have to change all <set
>> field="entityName" in lookup screens !!!
>>
>> Jacques
>>
>> From: "Jacques Le Roux" <[hidden email]>
>>> Yes, there is a problem somewhere, if you replace
>>>  <set field="entityName" value="UserLoginAndPartyDetails"/>
>>> by
>>>  <set field="entityName2" value="UserLoginAndPartyDetails"/>
>>> in  <screen name="LookupUserLoginAndPartyDetails">
>>>
>>> (and of course in FindLookUp.groovy) you have a workaround. Please
>>> open a Jira issue for this, as it's a deeper bug that should
>>> be solved
>>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices 
>>>
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>>> From: "Karim Rahimpur" <[hidden email]>
>>>
>>>> Christopher,
>>>>
>>>> For the second problem you mention, there should be a bug waiting
>>>> to be
>>>> resolved ;-)
>>>> However, you can type in and add the UserLogin if you know it.
>>>>
>>>> ChristopherJ wrote:
>>>>> Thanks Karim
>>>>>
>>>>> I see what you mean by using ChristopherJ instead of 10010(partyID)
>>>>> it adds the security group correctly to that particular userlogon.
>>>>> I now understand why the user logon ID is used instead of the party
>>>>> ID because of multiple userlogons for the same partyID.
>>>>>
>>>>>
>>>>> OK First Problem solved (user in front of my keyboard)
>>>>>
>>>>> The second problem is when searching for a userlogon under the
>>>>> security
>>>>> group of your choice (as illustrated by the second image in my
>>>>> first post).
>>>>> The same problem occurs on the demo hotwax server.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Karim Rahimpur wrote:
>>>>>
>>>>>> Hi Christopher,
>>>>>>
>>>>>> It seems you're mistaking a PartyId for a UserLogin. You have to
>>>>>> create
>>>>>> a UserLogin for your Party and use that. E.g. you have a Party whose
>>>>>> PartyId=10010, create a UserLogin for that Party and assign it to
>>>>>> the
>>>>>> security group. You can also create several UserLogins for a
>>>>>> Party, just
>>>>>> as in the demo, the Party with PartyId admin has several UserLogins:
>>>>>> https://demo.hotwaxmedia.com/partymgr/control/viewprofile?partyId=admin 
>>>>>>
>>>>>>
>>>>>> Regards,
>>>>>> Karim
>>>>>>
>>>>>>
>>>>>> ChristopherJ wrote:
>>>>>>
>>>>>>> Hi all
>>>>>>>
>>>>>>> The following error message is displayed when I try to manually
>>>>>>> add a
>>>>>>> user
>>>>>>> to a security group.
>>>>>>>
>>>>>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bman.jpeg 
>>>>>>>
>>>>>>>
>>>>>>> And if I use the search option for users this message comes in
>>>>>>> to view.
>>>>>>>
>>>>>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bsearch.jpeg 
>>>>>>>
>>>>>>>
>>>>>>> Cheers
>>>>>>>
>>>>>>> Fedora 10
>>>>>>> Svn 732624
>>>>>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Add UserLogin to Security Group error

Adrian Crum
This makes sense. I don't see how FlexibleStringExpander would affect
(or create) this problem.

-Adrian

Karim Rahimpur wrote:

> Hi Jacques,
>
> I've looked into this, and tried out the following:
>
> In LookupForms.xml :
>
>  replaced two lines reading:
>
>    <set field="entityName" value="entityName"/>
>
>  with:
>
>    <set field="entityName" value="UserLoginAndPartyDetails"/>
>
> There are two forms defined in LookupForms.xml where this occurs:
>
> - listLookupPartyAndUserLoginAndPerson
> - listLookupUserLoginAndPartyDetails
>
> After that, e.g. from the order manager where you create a new order,
> the UserLogin lookup works fine (at least to the point where you find
> and select a UserLogin).
> Also e.g.
> https://127.0.0.1:8443/partymgr/control/EditSecurityGroupUserLogins?groupId=CATALOGADMIN 
> works fine searching and selecting the UserLogin.
>
> I've tried this on my current copy which is not updated to the latest
> svn trunk, but I've looked at the latest LookupForms.xml and those lines
> (line 218 and 248) are just the same.
>
> I don't know about the FlexibleStringExpander, but I think the above
> could be the solution, at least I think that those lines reading "<set
> field="entityName" value="entityName"/>" surely are wrong, don't you?
>
> If you agree, I'll create a Jira issue and supply a patch later on.
>
> Regards,
> Karim
>> The error seems to come from expandString in  
>> FlexibleStringExpander.java[110]. It seems that this.strElems should
>> not be null there
>> or this.orig is wrong. I will try to dig in this afternoon. I think
>> that this problem is more general than the occurence you found.
>>
>> Jacques
>>
>> From: "Jacques Le Roux" <[hidden email]>
>>> Please don't use this as a *real* workaround, since if you change
>>> FindLookUp.groovy you will have to change all <set
>>> field="entityName" in lookup screens !!!
>>>
>>> Jacques
>>>
>>> From: "Jacques Le Roux" <[hidden email]>
>>>> Yes, there is a problem somewhere, if you replace
>>>>  <set field="entityName" value="UserLoginAndPartyDetails"/>
>>>> by
>>>>  <set field="entityName2" value="UserLoginAndPartyDetails"/>
>>>> in  <screen name="LookupUserLoginAndPartyDetails">
>>>>
>>>> (and of course in FindLookUp.groovy) you have a workaround. Please
>>>> open a Jira issue for this, as it's a deeper bug that should
>>>> be solved
>>>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices 
>>>>
>>>>
>>>> Thanks
>>>>
>>>> Jacques
>>>>
>>>> From: "Karim Rahimpur" <[hidden email]>
>>>>
>>>>> Christopher,
>>>>>
>>>>> For the second problem you mention, there should be a bug waiting
>>>>> to be
>>>>> resolved ;-)
>>>>> However, you can type in and add the UserLogin if you know it.
>>>>>
>>>>> ChristopherJ wrote:
>>>>>> Thanks Karim
>>>>>>
>>>>>> I see what you mean by using ChristopherJ instead of 10010(partyID)
>>>>>> it adds the security group correctly to that particular userlogon.
>>>>>> I now understand why the user logon ID is used instead of the party
>>>>>> ID because of multiple userlogons for the same partyID.
>>>>>>
>>>>>>
>>>>>> OK First Problem solved (user in front of my keyboard)
>>>>>>
>>>>>> The second problem is when searching for a userlogon under the
>>>>>> security
>>>>>> group of your choice (as illustrated by the second image in my
>>>>>> first post).
>>>>>> The same problem occurs on the demo hotwax server.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Karim Rahimpur wrote:
>>>>>>
>>>>>>> Hi Christopher,
>>>>>>>
>>>>>>> It seems you're mistaking a PartyId for a UserLogin. You have to
>>>>>>> create
>>>>>>> a UserLogin for your Party and use that. E.g. you have a Party whose
>>>>>>> PartyId=10010, create a UserLogin for that Party and assign it to
>>>>>>> the
>>>>>>> security group. You can also create several UserLogins for a
>>>>>>> Party, just
>>>>>>> as in the demo, the Party with PartyId admin has several UserLogins:
>>>>>>> https://demo.hotwaxmedia.com/partymgr/control/viewprofile?partyId=admin 
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>> Karim
>>>>>>>
>>>>>>>
>>>>>>> ChristopherJ wrote:
>>>>>>>
>>>>>>>> Hi all
>>>>>>>>
>>>>>>>> The following error message is displayed when I try to manually
>>>>>>>> add a
>>>>>>>> user
>>>>>>>> to a security group.
>>>>>>>>
>>>>>>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bman.jpeg 
>>>>>>>>
>>>>>>>>
>>>>>>>> And if I use the search option for users this message comes in
>>>>>>>> to view.
>>>>>>>>
>>>>>>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bsearch.jpeg 
>>>>>>>>
>>>>>>>>
>>>>>>>> Cheers
>>>>>>>>
>>>>>>>> Fedora 10
>>>>>>>> Svn 732624
>>>>>>>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Add UserLogin to Security Group error

Jacques Le Roux
Administrator
In reply to this post by Karim Rahimpur
Thanks Karim,

Interesting side effect, I checked there are no other same issues. Fixed in revision: 732720  

Jacques

From: "Karim Rahimpur" <[hidden email]>

> Hi Jacques,
>
> I've looked into this, and tried out the following:
>
> In LookupForms.xml :
>
>  replaced two lines reading:
>
>    <set field="entityName" value="entityName"/>
>
>  with:
>
>    <set field="entityName" value="UserLoginAndPartyDetails"/>
>
> There are two forms defined in LookupForms.xml where this occurs:
>
> - listLookupPartyAndUserLoginAndPerson
> - listLookupUserLoginAndPartyDetails
>
> After that, e.g. from the order manager where you create a new order,
> the UserLogin lookup works fine (at least to the point where you find
> and select a UserLogin).
> Also e.g.
> https://127.0.0.1:8443/partymgr/control/EditSecurityGroupUserLogins?groupId=CATALOGADMIN 
> works fine searching and selecting the UserLogin.
>
> I've tried this on my current copy which is not updated to the latest
> svn trunk, but I've looked at the latest LookupForms.xml and those lines
> (line 218 and 248) are just the same.
>
> I don't know about the FlexibleStringExpander, but I think the above
> could be the solution, at least I think that those lines reading "<set
> field="entityName" value="entityName"/>" surely are wrong, don't you?
>
> If you agree, I'll create a Jira issue and supply a patch later on.
>
> Regards,
> Karim
>> The error seems to come from expandString in  
>> FlexibleStringExpander.java[110]. It seems that this.strElems should
>> not be null there
>> or this.orig is wrong. I will try to dig in this afternoon. I think
>> that this problem is more general than the occurence you found.
>>
>> Jacques
>>
>> From: "Jacques Le Roux" <[hidden email]>
>>> Please don't use this as a *real* workaround, since if you change
>>> FindLookUp.groovy you will have to change all <set
>>> field="entityName" in lookup screens !!!
>>>
>>> Jacques
>>>
>>> From: "Jacques Le Roux" <[hidden email]>
>>>> Yes, there is a problem somewhere, if you replace
>>>>  <set field="entityName" value="UserLoginAndPartyDetails"/>
>>>> by
>>>>  <set field="entityName2" value="UserLoginAndPartyDetails"/>
>>>> in  <screen name="LookupUserLoginAndPartyDetails">
>>>>
>>>> (and of course in FindLookUp.groovy) you have a workaround. Please
>>>> open a Jira issue for this, as it's a deeper bug that should
>>>> be solved
>>>> http://docs.ofbiz.org/display/OFBADMIN/OFBiz+Contributors+Best+Practices 
>>>>
>>>>
>>>> Thanks
>>>>
>>>> Jacques
>>>>
>>>> From: "Karim Rahimpur" <[hidden email]>
>>>>
>>>>> Christopher,
>>>>>
>>>>> For the second problem you mention, there should be a bug waiting
>>>>> to be
>>>>> resolved ;-)
>>>>> However, you can type in and add the UserLogin if you know it.
>>>>>
>>>>> ChristopherJ wrote:
>>>>>> Thanks Karim
>>>>>>
>>>>>> I see what you mean by using ChristopherJ instead of 10010(partyID)
>>>>>> it adds the security group correctly to that particular userlogon.
>>>>>> I now understand why the user logon ID is used instead of the party
>>>>>> ID because of multiple userlogons for the same partyID.
>>>>>>
>>>>>>
>>>>>> OK First Problem solved (user in front of my keyboard)
>>>>>>
>>>>>> The second problem is when searching for a userlogon under the
>>>>>> security
>>>>>> group of your choice (as illustrated by the second image in my
>>>>>> first post).
>>>>>> The same problem occurs on the demo hotwax server.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Karim Rahimpur wrote:
>>>>>>
>>>>>>> Hi Christopher,
>>>>>>>
>>>>>>> It seems you're mistaking a PartyId for a UserLogin. You have to
>>>>>>> create
>>>>>>> a UserLogin for your Party and use that. E.g. you have a Party whose
>>>>>>> PartyId=10010, create a UserLogin for that Party and assign it to
>>>>>>> the
>>>>>>> security group. You can also create several UserLogins for a
>>>>>>> Party, just
>>>>>>> as in the demo, the Party with PartyId admin has several UserLogins:
>>>>>>> https://demo.hotwaxmedia.com/partymgr/control/viewprofile?partyId=admin 
>>>>>>>
>>>>>>>
>>>>>>> Regards,
>>>>>>> Karim
>>>>>>>
>>>>>>>
>>>>>>> ChristopherJ wrote:
>>>>>>>
>>>>>>>> Hi all
>>>>>>>>
>>>>>>>> The following error message is displayed when I try to manually
>>>>>>>> add a
>>>>>>>> user
>>>>>>>> to a security group.
>>>>>>>>
>>>>>>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bman.jpeg 
>>>>>>>>
>>>>>>>>
>>>>>>>> And if I use the search option for users this message comes in
>>>>>>>> to view.
>>>>>>>>
>>>>>>>> http://www.nabble.com/file/p21346925/Party%2BSecurity%2BError%2Bsearch.jpeg 
>>>>>>>>
>>>>>>>>
>>>>>>>> Cheers
>>>>>>>>
>>>>>>>> Fedora 10
>>>>>>>> Svn 732624
>>>>>>>>
>>
>