SQL to check Bitbucket user permission
Bitbucket permission can be assigned at project level or repository level for a group and user.
The SQL (MSSQL Server) below can be used to check all projects & repositories permission for a given user, include the access assigned to an individual user or a group.
with repo_access as ( select distinct p.id as "Project ID", p.name as "Project Name", r.name as "Repo Name", cu.id as "User ID (Individual)", cu.user_name as "Username (Individual)", Concat(cu.