Cannot delete an internal directory user in Bamboo with error - The user directory doesn't allow this operation.

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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.

*Except Fisheye and Crucible

    

Summary

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.


Environment

The solution in this article has been tested on version 8.1.2 but may work with other versions of Bamboo.

Diagnosis

Confirm the user directories on Bamboo Server to confirm the user directory is enabled using the below query:

Verify user directories on Bamboo server
SELECT * FROM cwd_directory;

Verify the user information on Bamboo database to confirm that the user is created in internal database:

Verify user directories on Bamboo server
SELECT * FROM cwd_user WHERE user_name = 'testuser';


Cause

One of the limitations of the current internal user management is that users that have added labels or comments can't be removed.

Solution

Search through the comments and labels made by a user using the below SQL query:

Search comments or labels created by a user
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 comments or labels
DELETE FROM USER_COMMENT WHERE USER_NAME='<username>';
DELETE FROM BUILDRESULTSUMMARY_LABEL WHERE USER_NAME='<username>';

(info) Replace <username> with the username you cannot delete

(warning) Always take a database backup before performing manual update or deletion queries.


Last modified on Nov 6, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.