MCPcopy Create free account
hub / github.com/dfinity/orbit / add_default_groups

Function add_default_groups

core/station/impl/src/services/system.rs:756–776  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

754 use super::INITIAL_ICP_ASSET;
755
756 pub fn add_default_groups() {
757 // adds the admin group which is used as the default group for admins during the canister instantiation
758 USER_GROUP_REPOSITORY.insert(
759 ADMIN_GROUP_ID.to_owned(),
760 UserGroup {
761 id: ADMIN_GROUP_ID.to_owned(),
762 name: "Admin".to_owned(),
763 last_modification_timestamp: next_time(),
764 },
765 );
766
767 // adds the operator group which is used as the default group for non-sensitive operators
768 USER_GROUP_REPOSITORY.insert(
769 OPERATOR_GROUP_ID.to_owned(),
770 UserGroup {
771 id: OPERATOR_GROUP_ID.to_owned(),
772 name: "Operator".to_owned(),
773 last_modification_timestamp: next_time(),
774 },
775 );
776 }
777
778 pub fn add_default_assets() {
779 let initial_assets: Vec<Asset> = vec![INITIAL_ICP_ASSET.clone()];

Callers 1

init_canisterMethod · 0.85

Calls 2

next_timeFunction · 0.50
insertMethod · 0.45

Tested by

no test coverage detected