MCPcopy Create free account
hub / github.com/NodeDB-Lab/nodedb / put_admin_user

Function put_admin_user

nodedb/tests/catalog_integrity_helpers/mod.rs:41–62  ·  view source on GitHub ↗
(catalog: &SystemCatalog)

Source from the content-addressed store, hash-verified

39}
40
41pub fn put_admin_user(catalog: &SystemCatalog) {
42 let user = StoredUser {
43 user_id: 1,
44 username: ADMIN.to_string(),
45 tenant_id: TENANT,
46 password_hash: "argon2id$dummy".to_string(),
47 scram_salt: vec![],
48 scram_salted_password: vec![],
49 roles: vec!["superuser".to_string()],
50 is_superuser: true,
51 is_active: true,
52 is_service_account: false,
53 created_at: 0,
54 updated_at: 0,
55 password_expires_at: 0,
56 must_change_password: false,
57 password_changed_at: 0,
58 default_database_id: 0,
59 accessible_databases: vec![],
60 };
61 catalog.put_user(&user).unwrap();
62}
63
64pub fn make_collection(name: &str) -> StoredCollection {
65 StoredCollection::new(TENANT, name, ADMIN)

Callers 2

make_sharedFunction · 0.85
make_catalogFunction · 0.85

Calls 2

to_stringMethod · 0.80
put_userMethod · 0.80

Tested by

no test coverage detected