Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TECH-292 - Fix an issue with the incorrect admin being set #80

Merged
merged 1 commit into from
Aug 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions scripts/deploy-civic-backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ EOF
}

II_CANISTER_ID=
ADMIN_PRINCIPAL_ID=tglqb-kbqlj-to66e-3w5sg-kkz32-c6ffi-nsnta-vj2gf-vdcc5-5rzjk-jae
ADMIN_PRINCIPAL_ID="${ADMIN_PRINCIPAL_ID:-$(dfx identity get-principal)}"

while [[ $# -gt 0 ]]
do
Expand Down Expand Up @@ -130,7 +130,7 @@ dfx deploy civic_canister_backend --network "$DFX_NETWORK" --argument '(
derivation_origin = "'"$ISSUER_DERIVATION_ORIGIN"'";
frontend_hostname = "'"$ISSUER_FRONTEND_HOSTNAME"'";
admin = principal "'"$ADMIN_PRINCIPAL_ID"'";
authorized_issuers = vec { principal "'"$ADMIN_PRINCIPAL_ID"'" };
authorized_issuers = vec {};
}
)'
# Revert changes
Expand Down
4 changes: 2 additions & 2 deletions scripts/upgrade-civic-backend.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ EOF
}

II_CANISTER_ID=
ADMIN_PRINCIPAL_ID=tglqb-kbqlj-to66e-3w5sg-kkz32-c6ffi-nsnta-vj2gf-vdcc5-5rzjk-jae
ADMIN_PRINCIPAL_ID="${ADMIN_PRINCIPAL_ID:-$(dfx identity get-principal)}"

while [[ $# -gt 0 ]]
do
Expand Down Expand Up @@ -150,7 +150,7 @@ dfx deploy --upgrade-unchanged civic_canister_backend --network "$DFX_NETWORK" -
derivation_origin = "'"$ISSUER_DERIVATION_ORIGIN"'";
frontend_hostname = "'"$ISSUER_FRONTEND_HOSTNAME"'";
admin = principal "'"$ADMIN_PRINCIPAL_ID"'";
authorized_issuers = vec { principal "'"$ADMIN_PRINCIPAL_ID"'" };
authorized_issuers = vec {};
}
)'
# Revert changes
Expand Down
2 changes: 1 addition & 1 deletion src/civic_canister_backend/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ impl Default for IssuerConfig {
derivation_origin: derivation_origin.clone(),
frontend_hostname: derivation_origin,
admin: ic_cdk::api::caller(),
authorized_issuers: vec![ic_cdk::api::caller()],
authorized_issuers: vec![],
}
}
}
Expand Down