fixes for cli config download

This commit is contained in:
Nirav Parikh
2022-06-15 12:37:50 +05:30
parent e0afe7b315
commit 7d04220d3a
2 changed files with 18 additions and 2 deletions

View File

@@ -326,8 +326,8 @@ func setup() {
// users and role management services
cc := common.CliConfigDownloadData{
RestEndpoint: apiAddr,
OpsEndpoint: apiAddr,
RestEndpoint: sentryBootstrapAddr,
OpsEndpoint: sentryBootstrapAddr,
}
if dev {
cc.Profile = "staging"

View File

@@ -27,6 +27,22 @@ FROM (
ga.trash = FALSE
AND gr.trash = FALSE
UNION
SELECT
ga.account_id,
gr.group_id,
p.id,
gr.role_id,
gr.organization_id,
gr.partner_id
FROM
authsrv_groupaccount ga
INNER JOIN authsrv_grouprole gr ON ga.group_id = gr.group_id
INNER JOIN authsrv_resourcerole rr ON rr.id = gr.role_id AND rr.scope = 'organization'
INNER JOIN authsrv_project p ON p.organization_id = gr.organization_id AND p.partner_id = gr.partner_id
WHERE
ga.trash = FALSE
AND gr.trash = FALSE
UNION
SELECT
account_id,
uuid_nil() as group_id,