-
Bug
-
Resolution: Unresolved
-
Low
-
None
-
7.4.1, 7.4.5
-
7.04
-
2
-
Severity 3 - Minor
-
0
-
Summary
If a group is available in both the JIRA internal directory and an external directory and was created in each directory with mixed cases, the following error will be shown in the UI when trying to remove a user from this group:
Cannot remove user 'admin' from group 'jira-users-test' since user is not a member of 'jira-users-test'
Steps to reproduce
- Log in JIRA as a system admin user
- Create a group called JIRA-users-test in the JIRA internal directory (from ⚙ > User Management > Groups)
- Create a user called admin in the JIRA internal directory (from ⚙ > User Management > Users)
- Add the admin user to the JIRA-users-test group (from ⚙ > User Management > Users)
- Create an Apache LDAP directory add to this directory a user called john and a group called jira-users-test (make sure that the name of the group is in all lower case)
- Add the user john to the jira-users-test group within the LDAP
- Connect JIRA to this LDAP directory with read/write permission and sync with the directory (from ⚙ > User Management > Directories)
- Go to the page ⚙ > User Management > Users and look for the 2 users admin and john. Note that the 2 groups JIRA-users-test and jira-users-test these users belong to are displayed with different cases:
- Go to ⚙ > User Management > Groups and note that there is only 1 version of the jira-users-test group, which is jira-users-test (the lower-cased version of the 2 groups):
- Click on "Edit Member" next to the jira-users-test group, and try to remove the user 'admin'
- Go back to ⚙ > User Management > Users, look for the user admin, and try to remove the JIRA-users-test group from this user
Expected Results
- In Step 9, the admin user should be removed from the group jira-users-test
- In Step 10, the group JIRA-users-test should be removed from the user admin
Actual Results
- In step 9, we get the following error:
Cannot remove user 'admin' from group 'jira-users-test' since user is not a member of 'jira-users-test'
- In step 10, we get the following error:
You can not remove a group from this user as it is not visible to you
Note that on the other hand, JIRA allows me to remove the user *john from the group 'jira-users-test'*
Troubleshooting
To confirm that you are indeed facing this bug, you can look into the cwd_group and cwd_membership tables in the database and verify that you can see the mixed case versions of the group jira-users-test in these tables:
It seems that JIRA treats somehow the 2 versions of the groups as 2 different groups (instead of the same group), and does not map properly users to the right group, and cause the error when we try to remove a user from this group.
Workaround
Please make sure to create a native backup of your JIRA database before running the following query, to that you can revert the changes if anything goes wrong.
Running the following query will be at your own risk.
- Stop JIRA
- Backup your database
- Run the following queries to force the group_name column from the cwd_group table and the parent_name column from the cwd_membership table to be all lower cased (note that the query to run might slightly different depending on the type of database that you are using)
update cwd_group set group_name = LOWER(group_name); update cwd_membership set parent_name = LOWER(parent_name);
- Start JIRA
- relates to
-
JRASERVER-35309 Updating the Lower Case Output option in crowd does not affect group names in JIRA
- Gathering Impact