Bug 1169161 - [JBPM-4518] JBossUserGroupCallbackImpl should support "org.jbpm.ht.user.separator" property to customize "Group Id" separator for groups
Summary: [JBPM-4518] JBossUserGroupCallbackImpl should support "org.jbpm.ht.user.separ...
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Core
Version: 6.0.3
Hardware: All
OS: All
medium
medium
Target Milestone: ER3
: 6.1.0
Assignee: Alessandro Lazarotti
QA Contact: Marek Baluch
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-11-30 21:29 UTC by Musharraf Hussain
Modified: 2020-03-27 20:04 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 20:04:20 UTC
Type: Enhancement
Embargoed:


Attachments (Terms of Use)
jBPM6_CustomSeparatorBugTest.zip (924.69 KB, application/zip)
2014-11-30 21:33 UTC, Musharraf Hussain
no flags Details
PatchJars.zip (1.47 MB, patch)
2014-11-30 21:36 UTC, Musharraf Hussain
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker JBPM-4518 0 Major Open JBossUserGroupCallbackImpl should support "org.jbpm.ht.user.separator" property to customize "Group Id" separator for gr... 2015-05-25 09:25:04 UTC

Description Musharraf Hussain 2014-11-30 21:29:13 UTC
Description of problem:
- With the current code of "JBossUserGroupCallbackImpl" (including the code in master) it is restricting users from using special characters like "," in their "Group Id" names. 
e.g. if we use the following Group Id to set for a User in a Property , the "JBossUserGroupCallbackImpl" treats "maryg" and "g" as two Group Id in place of treating "maryg,g" as a single Group Id.
~~~
...
        Properties properties = new Properties();
        properties.setProperty("krisv", "krisvgg");
        properties.setProperty("mary", "maryg,g");
        properties.setProperty("john", "johngg");      
    
        UserGroupCallback userGroupCallback = new JBossUserGroupCallbackImpl(properties);
...
~~~

It is because of this restriction in it's code which only checks for "," comma for separating multiple Group Ids when a user enters it's group names inside a Property.
~~~
			groups = Arrays.asList(userGroups.getProperty(userId, "").split(","));
...
~~~

- Please enhance the "JBossUserGroupCallbackImpl" code so that it allows the usage of "org.jbpm.ht.user.separator" property to customize "Group Id" separator for groups.

Version-Release number of selected component (if applicable):
- jBPM 6.0.3-redhat-6, 6.0.3-redhat-7 (i.e. including Roll Up patch#1 for BPMS 6.0.3)

How reproducible:
- Always

Steps to Reproduce:
1. Import the attached "jBPM6_CustomSeparatorBugTest.zip" project in JBDS/Eclipse IDE.
2. Follow the instructions provided in the README.md file inside the project which tells you how to add a group with "Group Id" (containing a character ",") to a user and try to claim and complete a task.
3.

Actual results:
- User Task does not get listed for the specified user "mary" as if "mary" is not the potential owner for the User Task.

Expected results:
- Ideally "JBossUserGroupCallbackImpl" should have recognized "maryg,g" as a complete Group Id.

Additional info:
- Please refer to "https://issues.jboss.org/browse/JBPM-4518" which is the upstream JIRA raised with the pull request.

Comment 1 Musharraf Hussain 2014-11-30 21:30:30 UTC
[Private]

Pull request sent for the JIRA [JBPM-4518]: https://github.com/droolsjbpm/jbpm/pull/224

Comment 2 Musharraf Hussain 2014-11-30 21:33:45 UTC
Created attachment 963039 [details]
jBPM6_CustomSeparatorBugTest.zip

Comment 3 Musharraf Hussain 2014-11-30 21:36:51 UTC
Created attachment 963040 [details]
PatchJars.zip

Comment 5 Maciej Swiderski 2014-12-03 14:23:24 UTC
pull request applied with some modifications to both master and 6.2.x so it will be available in 6.1 product

jbpm
master:
https://github.com/droolsjbpm/jbpm/commit/0cfaa5e4d301a3b2dcb83cee32cd6c0233137e39

6.2.x:
https://github.com/droolsjbpm/jbpm/commit/9716261daa9912ddd5ed327f10c60442b28f3838

Comment 6 Musharraf Hussain 2014-12-03 16:43:27 UTC
Thank you Maciej.

Comment 7 Jiri Svitak 2015-01-09 13:01:44 UTC
Verified in BPM Suite 6.1.0.ER3.

QE test coverage:
https://gitlab.mw.lab.eng.bos.redhat.com/bxms/brms/commit/efe52f95748e4b86df0c0ad71db0a645374096f4


Note You need to log in before you can comment on or make changes to this bug.