How do I find "unlicensed" users for my Bitbucket Server instance?
プラットフォームについて: 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 は除く
問題
Unlicensed users are ones that are in Bitbucket user database, created locally or synchronized from external user directories, and which do not have access to Bitbucket Server on the Global Permissions page either:
- Directly via username
- Via a group which the user is part of
ソリューション
Run the following query against the database:
SELECT name
FROM sta_normal_user
WHERE NOT EXISTS (
SELECT * FROM sta_global_permission WHERE user_id = sta_normal_user.user_id
)
AND NOT EXISTS (
SELECT * FROM cwd_membership WHERE parent_name IN (
SELECT group_name FROM sta_global_permission
)
AND child_name = sta_normal_user.name
);
The plugin is locked down to administrators but it can be uninstalled from the Manage Plugins
screen if preferred.