Cannot delete an internal directory user in Bamboo with error - The user directory doesn't allow this operation.
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Fisheye および Crucible は除く
要約
Cannot delete an internal directory user in Bamboo with the following error appear in GUI
Can't delete user 'testuser'. The user directory doesn't allow this operation.
Please try reloading the page.
環境
The solution in this article has been tested on version 8.1.2 but may work with other versions of Bamboo.
診断
Confirm the user directories on Bamboo Server to confirm the user directory is enabled using the below query:
SELECT * FROM cwd_directory;
Verify the user information on Bamboo database to confirm that the user is created in internal database:
SELECT * FROM cwd_user WHERE user_name = 'testuser';
原因
One of the limitations of the current internal user management is that users that have added labels or comments can't be removed.
ソリューション
Search through the comments and labels made by a user using the below SQL query:
SELECT * FROM USER_COMMENT WHERE USER_NAME='<username>';
SELECT * FROM BUILDRESULTSUMMARY_LABEL WHERE USER_NAME='<username>';
If found, you can delete them using the below SQL query:
DELETE FROM USER_COMMENT WHERE USER_NAME='<username>';
DELETE FROM BUILDRESULTSUMMARY_LABEL WHERE USER_NAME='<username>';
Replace <username> with the username you cannot delete
Always take a database backup before performing manual update or deletion queries.