mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 20:47:01 +01:00
Optimized all possible constant values using const
Replace all replaceable static declarations with const values.
Ref: 61e3dc9c1e/text/0246-const-vs-static.md
This commit is contained in:
parent
aa2e872ae9
commit
ffa2e416aa
|
@ -30,7 +30,7 @@ pub mod asynchronous;
|
|||
|
||||
use crate::asynchronous::KanidmAsyncClient;
|
||||
|
||||
pub static APPLICATION_JSON: &'static str = "application/json";
|
||||
pub const APPLICATION_JSON: &'static str = "application/json";
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum ClientError {
|
||||
|
|
|
@ -15,9 +15,9 @@ use actix::prelude::*;
|
|||
use log::debug;
|
||||
|
||||
static PORT_ALLOC: AtomicUsize = AtomicUsize::new(8080);
|
||||
static ADMIN_TEST_PASSWORD: &str = "integration test admin password";
|
||||
static ADMIN_TEST_PASSWORD_CHANGE: &str = "integration test admin new🎉";
|
||||
static UNIX_TEST_PASSWORD: &str = "unix test user password";
|
||||
const ADMIN_TEST_PASSWORD: &str = "integration test admin password";
|
||||
const ADMIN_TEST_PASSWORD_CHANGE: &str = "integration test admin new🎉";
|
||||
const UNIX_TEST_PASSWORD: &str = "unix test user password";
|
||||
|
||||
// Test external behaviorus of the service.
|
||||
|
||||
|
|
|
@ -729,8 +729,8 @@ mod tests {
|
|||
use crate::cache::Id;
|
||||
use kanidm_proto::v1::{UnixGroupToken, UnixUserToken};
|
||||
|
||||
static TESTACCOUNT1_PASSWORD_A: &str = "password a for account1 test";
|
||||
static TESTACCOUNT1_PASSWORD_B: &str = "password b for account1 test";
|
||||
const TESTACCOUNT1_PASSWORD_A: &str = "password a for account1 test";
|
||||
const TESTACCOUNT1_PASSWORD_B: &str = "password b for account1 test";
|
||||
|
||||
#[test]
|
||||
fn test_cache_db_account_basic() {
|
||||
|
|
|
@ -13,10 +13,10 @@ use kanidm_client::asynchronous::KanidmAsyncClient;
|
|||
use kanidm_client::{KanidmClient, KanidmClientBuilder};
|
||||
|
||||
static PORT_ALLOC: AtomicUsize = AtomicUsize::new(18080);
|
||||
static ADMIN_TEST_PASSWORD: &str = "integration test admin password";
|
||||
static TESTACCOUNT1_PASSWORD_A: &str = "password a for account1 test";
|
||||
static TESTACCOUNT1_PASSWORD_B: &str = "password b for account1 test";
|
||||
static TESTACCOUNT1_PASSWORD_INC: &str = "never going to work";
|
||||
const ADMIN_TEST_PASSWORD: &str = "integration test admin password";
|
||||
const TESTACCOUNT1_PASSWORD_A: &str = "password a for account1 test";
|
||||
const TESTACCOUNT1_PASSWORD_B: &str = "password b for account1 test";
|
||||
const TESTACCOUNT1_PASSWORD_INC: &str = "never going to work";
|
||||
|
||||
fn run_test(fix_fn: fn(&KanidmClient) -> (), test_fn: fn(CacheLayer, KanidmAsyncClient) -> ()) {
|
||||
// ::std::env::set_var("RUST_LOG", "actix_web=debug,kanidm=debug");
|
||||
|
|
|
@ -1864,7 +1864,7 @@ mod tests {
|
|||
}};
|
||||
}
|
||||
|
||||
static JSON_TESTPERSON1_REDUCED: &'static str = r#"{
|
||||
const JSON_TESTPERSON1_REDUCED: &'static str = r#"{
|
||||
"valid": null,
|
||||
"state": null,
|
||||
"attrs": {
|
||||
|
@ -2137,7 +2137,7 @@ mod tests {
|
|||
}};
|
||||
}
|
||||
|
||||
static JSON_TEST_CREATE_AC1: &'static str = r#"{
|
||||
const JSON_TEST_CREATE_AC1: &'static str = r#"{
|
||||
"valid": null,
|
||||
"state": null,
|
||||
"attrs": {
|
||||
|
@ -2147,7 +2147,7 @@ mod tests {
|
|||
}
|
||||
}"#;
|
||||
|
||||
static JSON_TEST_CREATE_AC2: &'static str = r#"{
|
||||
const JSON_TEST_CREATE_AC2: &'static str = r#"{
|
||||
"valid": null,
|
||||
"state": null,
|
||||
"attrs": {
|
||||
|
@ -2158,7 +2158,7 @@ mod tests {
|
|||
}
|
||||
}"#;
|
||||
|
||||
static JSON_TEST_CREATE_AC3: &'static str = r#"{
|
||||
const JSON_TEST_CREATE_AC3: &'static str = r#"{
|
||||
"valid": null,
|
||||
"state": null,
|
||||
"attrs": {
|
||||
|
@ -2168,7 +2168,7 @@ mod tests {
|
|||
}
|
||||
}"#;
|
||||
|
||||
static JSON_TEST_CREATE_AC4: &'static str = r#"{
|
||||
const JSON_TEST_CREATE_AC4: &'static str = r#"{
|
||||
"valid": null,
|
||||
"state": null,
|
||||
"attrs": {
|
||||
|
|
|
@ -12,8 +12,8 @@ use uuid::Uuid;
|
|||
|
||||
// use uuid::Uuid;
|
||||
|
||||
static DBV_ID2ENTRY: &str = "id2entry";
|
||||
static DBV_INDEXV: &str = "indexv";
|
||||
const DBV_ID2ENTRY: &str = "id2entry";
|
||||
const DBV_INDEXV: &str = "indexv";
|
||||
|
||||
#[derive(Clone)]
|
||||
pub struct IdlSqlite {
|
||||
|
|
|
@ -23,7 +23,7 @@ use crate::be::idl_sqlite::{
|
|||
IdlSqlite, IdlSqliteReadTransaction, IdlSqliteTransaction, IdlSqliteWriteTransaction,
|
||||
};
|
||||
|
||||
static FILTER_TEST_THRESHOLD: usize = 8;
|
||||
const FILTER_TEST_THRESHOLD: usize = 8;
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum IDL {
|
||||
|
@ -1263,7 +1263,7 @@ mod tests {
|
|||
});
|
||||
}
|
||||
|
||||
pub static DB_BACKUP_FILE_NAME: &'static str = "./.backup_test.db";
|
||||
pub const DB_BACKUP_FILE_NAME: &'static str = "./.backup_test.db";
|
||||
|
||||
#[test]
|
||||
fn test_be_backup_restore() {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
// Template acp
|
||||
pub static _UUID_IDM_ACP_XX_V1: &str = "00000000-0000-0000-0000-ffffff0000XX";
|
||||
pub static JSON_IDM_ACP_XX_V1: &str = r#"{
|
||||
pub const _UUID_IDM_ACP_XX_V1: &str = "00000000-0000-0000-0000-ffffff0000XX";
|
||||
pub const JSON_IDM_ACP_XX_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -42,7 +42,7 @@ pub static JSON_IDM_ACP_XX_V1: &str = r#"{
|
|||
}"#;
|
||||
*/
|
||||
|
||||
pub static JSON_IDM_ADMINS_ACP_RECYCLE_SEARCH_V1: &str = r#"{
|
||||
pub const JSON_IDM_ADMINS_ACP_RECYCLE_SEARCH_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["object", "access_control_profile", "access_control_search"],
|
||||
"name": ["idm_admins_acp_recycle_search"],
|
||||
|
@ -58,7 +58,7 @@ pub static JSON_IDM_ADMINS_ACP_RECYCLE_SEARCH_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_IDM_ADMINS_ACP_REVIVE_V1: &str = r#"{
|
||||
pub const JSON_IDM_ADMINS_ACP_REVIVE_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["object", "access_control_profile", "access_control_modify"],
|
||||
"name": ["idm_admins_acp_revive"],
|
||||
|
@ -75,7 +75,7 @@ pub static JSON_IDM_ADMINS_ACP_REVIVE_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_IDM_SELF_ACP_READ_V1: &str = r#"{
|
||||
pub const JSON_IDM_SELF_ACP_READ_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["object", "access_control_profile", "access_control_search"],
|
||||
"name": ["idm_self_acp_read"],
|
||||
|
@ -102,7 +102,7 @@ pub static JSON_IDM_SELF_ACP_READ_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_IDM_SELF_ACP_WRITE_V1: &str = r#"{
|
||||
pub const JSON_IDM_SELF_ACP_WRITE_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["object", "access_control_profile", "access_control_modify"],
|
||||
"name": ["idm_self_acp_write"],
|
||||
|
@ -123,7 +123,7 @@ pub static JSON_IDM_SELF_ACP_WRITE_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_IDM_ALL_ACP_READ_V1: &str = r#"{
|
||||
pub const JSON_IDM_ALL_ACP_READ_V1: &str = r#"{
|
||||
"state": null,
|
||||
"attrs": {
|
||||
"class": ["object", "access_control_profile", "access_control_search"],
|
||||
|
@ -152,7 +152,7 @@ pub static JSON_IDM_ALL_ACP_READ_V1: &str = r#"{
|
|||
}"#;
|
||||
|
||||
// 7 people read acp JSON_IDM_PEOPLE_READ_PRIV_V1
|
||||
pub static JSON_IDM_ACP_PEOPLE_READ_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_PEOPLE_READ_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -174,7 +174,7 @@ pub static JSON_IDM_ACP_PEOPLE_READ_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// 8 people write acp JSON_IDM_PEOPLE_WRITE_PRIV_V1
|
||||
pub static JSON_IDM_ACP_PEOPLE_WRITE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_PEOPLE_WRITE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -199,7 +199,7 @@ pub static JSON_IDM_ACP_PEOPLE_WRITE_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// 13 user (person) account create acp JSON_IDM_PERSON_ACCOUNT_CREATE_PRIV_V1
|
||||
pub static JSON_IDM_ACP_PEOPLE_MANAGE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_PEOPLE_MANAGE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -234,7 +234,7 @@ pub static JSON_IDM_ACP_PEOPLE_MANAGE_PRIV_V1: &str = r#"{
|
|||
// right now, create requires you to have access to every attribute in a single snapshot,
|
||||
// so people will need to two step (create then import pw). Later we could add another
|
||||
// acp that allows the create here too? Should it be seperate?
|
||||
pub static JSON_IDM_ACP_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -260,7 +260,7 @@ pub static JSON_IDM_ACP_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV_V1: &str = r#"{
|
|||
}"#;
|
||||
|
||||
//
|
||||
pub static JSON_IDM_ACP_PEOPLE_EXTEND_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_PEOPLE_EXTEND_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -286,7 +286,7 @@ pub static JSON_IDM_ACP_PEOPLE_EXTEND_PRIV_V1: &str = r#"{
|
|||
// -- end people
|
||||
|
||||
// 9 group write acp JSON_IDM_GROUP_WRITE_PRIV_V1
|
||||
pub static JSON_IDM_ACP_GROUP_WRITE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_GROUP_WRITE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -315,7 +315,7 @@ pub static JSON_IDM_ACP_GROUP_WRITE_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// 10 account read acp JSON_IDM_ACCOUNT_READ_PRIV_V1
|
||||
pub static JSON_IDM_ACP_ACCOUNT_READ_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_ACCOUNT_READ_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -337,7 +337,7 @@ pub static JSON_IDM_ACP_ACCOUNT_READ_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// 11 account write acp JSON_IDM_ACCOUNT_WRITE_PRIV_V1
|
||||
pub static JSON_IDM_ACP_ACCOUNT_WRITE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_ACCOUNT_WRITE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -362,7 +362,7 @@ pub static JSON_IDM_ACP_ACCOUNT_WRITE_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// 12 service account create acp (only admins?) JSON_IDM_SERVICE_ACCOUNT_CREATE_PRIV_V1
|
||||
pub static JSON_IDM_ACP_ACCOUNT_MANAGE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_ACCOUNT_MANAGE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -395,7 +395,7 @@ pub static JSON_IDM_ACP_ACCOUNT_MANAGE_PRIV_V1: &str = r#"{
|
|||
// 14 radius read acp JSON_IDM_RADIUS_SERVERS_V1
|
||||
// The targetscope of this could change later to a "radius access" group or similar so we can add/remove
|
||||
// users from having radius access easier.
|
||||
pub static JSON_IDM_ACP_RADIUS_SERVERS_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_RADIUS_SERVERS_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -417,7 +417,7 @@ pub static JSON_IDM_ACP_RADIUS_SERVERS_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// 15 high priv account read JSON_IDM_HP_ACCOUNT_READ_PRIV_V1
|
||||
pub static JSON_IDM_ACP_HP_ACCOUNT_READ_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_HP_ACCOUNT_READ_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -439,7 +439,7 @@ pub static JSON_IDM_ACP_HP_ACCOUNT_READ_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// 16 high priv account write JSON_IDM_HP_ACCOUNT_WRITE_PRIV_V1
|
||||
pub static JSON_IDM_ACP_HP_ACCOUNT_WRITE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_HP_ACCOUNT_WRITE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -465,7 +465,7 @@ pub static JSON_IDM_ACP_HP_ACCOUNT_WRITE_PRIV_V1: &str = r#"{
|
|||
}"#;
|
||||
|
||||
// 17 high priv group write --> JSON_IDM_HP_GROUP_WRITE_PRIV_V1 (12)
|
||||
pub static JSON_IDM_ACP_HP_GROUP_WRITE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_HP_GROUP_WRITE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -495,7 +495,7 @@ pub static JSON_IDM_ACP_HP_GROUP_WRITE_PRIV_V1: &str = r#"{
|
|||
}"#;
|
||||
|
||||
// 18 schema write JSON_IDM_SCHEMA_WRITE_PRIV_V1
|
||||
pub static JSON_IDM_ACP_SCHEMA_WRITE_ATTRS_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_SCHEMA_WRITE_ATTRS_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -555,7 +555,7 @@ pub static JSON_IDM_ACP_SCHEMA_WRITE_ATTRS_PRIV_V1: &str = r#"{
|
|||
}"#;
|
||||
|
||||
// 19 acp read/write
|
||||
pub static JSON_IDM_ACP_ACP_MANAGE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_ACP_MANAGE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -647,7 +647,7 @@ pub static JSON_IDM_ACP_ACP_MANAGE_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_IDM_ACP_SCHEMA_WRITE_CLASSES_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_SCHEMA_WRITE_CLASSES_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -705,7 +705,7 @@ pub static JSON_IDM_ACP_SCHEMA_WRITE_CLASSES_PRIV_V1: &str = r#"{
|
|||
// 21 - anonymous / everyone schema read.
|
||||
|
||||
// 22 - group create right
|
||||
pub static JSON_IDM_ACP_GROUP_MANAGE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_GROUP_MANAGE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -735,7 +735,7 @@ pub static JSON_IDM_ACP_GROUP_MANAGE_PRIV_V1: &str = r#"{
|
|||
}"#;
|
||||
|
||||
// 23 - HP account manage
|
||||
pub static JSON_IDM_ACP_HP_ACCOUNT_MANAGE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_HP_ACCOUNT_MANAGE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -767,7 +767,7 @@ pub static JSON_IDM_ACP_HP_ACCOUNT_MANAGE_PRIV_V1: &str = r#"{
|
|||
}"#;
|
||||
|
||||
// 24 - hp group manage
|
||||
pub static JSON_IDM_ACP_HP_GROUP_MANAGE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_HP_GROUP_MANAGE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -797,7 +797,7 @@ pub static JSON_IDM_ACP_HP_GROUP_MANAGE_PRIV_V1: &str = r#"{
|
|||
}"#;
|
||||
|
||||
// 28 - domain admins acp
|
||||
pub static JSON_IDM_ACP_DOMAIN_ADMIN_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_DOMAIN_ADMIN_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -831,7 +831,7 @@ pub static JSON_IDM_ACP_DOMAIN_ADMIN_PRIV_V1: &str = r#"{
|
|||
}"#;
|
||||
|
||||
// 28 - system config
|
||||
pub static JSON_IDM_ACP_SYSTEM_CONFIG_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_SYSTEM_CONFIG_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -861,7 +861,7 @@ pub static JSON_IDM_ACP_SYSTEM_CONFIG_PRIV_V1: &str = r#"{
|
|||
}"#;
|
||||
|
||||
// 29 account unix extend
|
||||
pub static JSON_IDM_ACP_ACCOUNT_UNIX_EXTEND_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_ACCOUNT_UNIX_EXTEND_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -891,7 +891,7 @@ pub static JSON_IDM_ACP_ACCOUNT_UNIX_EXTEND_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// 30 group unix extend
|
||||
pub static JSON_IDM_ACP_GROUP_UNIX_EXTEND_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_GROUP_UNIX_EXTEND_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
pub static JSON_ADMIN_V1: &str = r#"{
|
||||
pub const JSON_ADMIN_V1: &str = r#"{
|
||||
"valid": {
|
||||
"uuid": "00000000-0000-0000-0000-000000000000"
|
||||
},
|
||||
|
@ -12,7 +12,7 @@ pub static JSON_ADMIN_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_IDM_ADMIN_V1: &str = r#"{
|
||||
pub const JSON_IDM_ADMIN_V1: &str = r#"{
|
||||
"valid": {
|
||||
"uuid": "00000000-0000-0000-0000-000000000018"
|
||||
},
|
||||
|
@ -26,7 +26,7 @@ pub static JSON_IDM_ADMIN_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_IDM_ADMINS_V1: &str = r#"{
|
||||
pub const JSON_IDM_ADMINS_V1: &str = r#"{
|
||||
"valid": {
|
||||
"uuid": "00000000-0000-0000-0000-000000000001"
|
||||
},
|
||||
|
@ -40,7 +40,7 @@ pub static JSON_IDM_ADMINS_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_SYSTEM_ADMINS_V1: &str = r#"{
|
||||
pub const JSON_SYSTEM_ADMINS_V1: &str = r#"{
|
||||
"valid": {
|
||||
"uuid": "00000000-0000-0000-0000-000000000019"
|
||||
},
|
||||
|
@ -56,7 +56,7 @@ pub static JSON_SYSTEM_ADMINS_V1: &str = r#"{
|
|||
|
||||
// groups
|
||||
// * People read managers
|
||||
pub static JSON_IDM_PEOPLE_READ_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_PEOPLE_READ_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_people_read_priv"],
|
||||
|
@ -66,7 +66,7 @@ pub static JSON_IDM_PEOPLE_READ_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// * People write managers
|
||||
pub static JSON_IDM_PEOPLE_MANAGE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_PEOPLE_MANAGE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_people_manage_priv"],
|
||||
|
@ -77,7 +77,7 @@ pub static JSON_IDM_PEOPLE_MANAGE_PRIV_V1: &str = r#"{
|
|||
]
|
||||
}
|
||||
}"#;
|
||||
pub static JSON_IDM_PEOPLE_WRITE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_PEOPLE_WRITE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_people_write_priv"],
|
||||
|
@ -90,7 +90,7 @@ pub static JSON_IDM_PEOPLE_WRITE_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_IDM_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_people_account_password_import_priv"],
|
||||
|
@ -99,7 +99,7 @@ pub static JSON_IDM_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_IDM_PEOPLE_EXTEND_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_PEOPLE_EXTEND_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_people_extend_priv"],
|
||||
|
@ -113,7 +113,7 @@ pub static JSON_IDM_PEOPLE_EXTEND_PRIV_V1: &str = r#"{
|
|||
|
||||
// * group write manager (no read, everyone has read via the anon, etc)
|
||||
// IDM_GROUP_CREATE_PRIV
|
||||
pub static JSON_IDM_GROUP_MANAGE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_GROUP_MANAGE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_group_manage_priv"],
|
||||
|
@ -125,7 +125,7 @@ pub static JSON_IDM_GROUP_MANAGE_PRIV_V1: &str = r#"{
|
|||
]
|
||||
}
|
||||
}"#;
|
||||
pub static JSON_IDM_GROUP_WRITE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_GROUP_WRITE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_group_write_priv"],
|
||||
|
@ -136,7 +136,7 @@ pub static JSON_IDM_GROUP_WRITE_PRIV_V1: &str = r#"{
|
|||
]
|
||||
}
|
||||
}"#;
|
||||
pub static JSON_IDM_GROUP_UNIX_EXTEND_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_GROUP_UNIX_EXTEND_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_group_unix_extend_priv"],
|
||||
|
@ -148,7 +148,7 @@ pub static JSON_IDM_GROUP_UNIX_EXTEND_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// * account read manager
|
||||
pub static JSON_IDM_ACCOUNT_READ_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACCOUNT_READ_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_account_read_priv"],
|
||||
|
@ -160,7 +160,7 @@ pub static JSON_IDM_ACCOUNT_READ_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// * account write manager
|
||||
pub static JSON_IDM_ACCOUNT_MANAGE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACCOUNT_MANAGE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_account_manage_priv"],
|
||||
|
@ -171,7 +171,7 @@ pub static JSON_IDM_ACCOUNT_MANAGE_PRIV_V1: &str = r#"{
|
|||
]
|
||||
}
|
||||
}"#;
|
||||
pub static JSON_IDM_ACCOUNT_WRITE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACCOUNT_WRITE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_account_write_priv"],
|
||||
|
@ -180,7 +180,7 @@ pub static JSON_IDM_ACCOUNT_WRITE_PRIV_V1: &str = r#"{
|
|||
"member": ["00000000-0000-0000-0000-000000000014"]
|
||||
}
|
||||
}"#;
|
||||
pub static JSON_IDM_ACCOUNT_UNIX_EXTEND_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACCOUNT_UNIX_EXTEND_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_account_unix_extend_priv"],
|
||||
|
@ -190,7 +190,7 @@ pub static JSON_IDM_ACCOUNT_UNIX_EXTEND_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// * RADIUS servers
|
||||
pub static JSON_IDM_RADIUS_SERVERS_V1: &str = r#"{
|
||||
pub const JSON_IDM_RADIUS_SERVERS_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_radius_servers"],
|
||||
|
@ -199,7 +199,7 @@ pub static JSON_IDM_RADIUS_SERVERS_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// * high priv account read manager
|
||||
pub static JSON_IDM_HP_ACCOUNT_READ_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_HP_ACCOUNT_READ_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_hp_account_read_priv"],
|
||||
|
@ -211,7 +211,7 @@ pub static JSON_IDM_HP_ACCOUNT_READ_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// * high priv account write manager
|
||||
pub static JSON_IDM_HP_ACCOUNT_MANAGE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_HP_ACCOUNT_MANAGE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_hp_account_manage_priv"],
|
||||
|
@ -222,7 +222,7 @@ pub static JSON_IDM_HP_ACCOUNT_MANAGE_PRIV_V1: &str = r#"{
|
|||
]
|
||||
}
|
||||
}"#;
|
||||
pub static JSON_IDM_HP_ACCOUNT_WRITE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_HP_ACCOUNT_WRITE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_hp_account_write_priv"],
|
||||
|
@ -234,7 +234,7 @@ pub static JSON_IDM_HP_ACCOUNT_WRITE_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// * Schema write manager
|
||||
pub static JSON_IDM_SCHEMA_MANAGE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_SCHEMA_MANAGE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_schema_manage_priv"],
|
||||
|
@ -246,7 +246,7 @@ pub static JSON_IDM_SCHEMA_MANAGE_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
// * ACP read/write manager
|
||||
pub static JSON_IDM_ACP_MANAGE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_ACP_MANAGE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_acp_manage_priv"],
|
||||
|
@ -256,7 +256,7 @@ pub static JSON_IDM_ACP_MANAGE_PRIV_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_IDM_HP_GROUP_MANAGE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_HP_GROUP_MANAGE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_hp_group_manage_priv"],
|
||||
|
@ -265,7 +265,7 @@ pub static JSON_IDM_HP_GROUP_MANAGE_PRIV_V1: &str = r#"{
|
|||
"member": ["00000000-0000-0000-0000-000000000019"]
|
||||
}
|
||||
}"#;
|
||||
pub static JSON_IDM_HP_GROUP_WRITE_PRIV_V1: &str = r#"{
|
||||
pub const JSON_IDM_HP_GROUP_WRITE_PRIV_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_hp_group_write_priv"],
|
||||
|
@ -276,7 +276,7 @@ pub static JSON_IDM_HP_GROUP_WRITE_PRIV_V1: &str = r#"{
|
|||
]
|
||||
}
|
||||
}"#;
|
||||
pub static JSON_DOMAIN_ADMINS: &str = r#"{
|
||||
pub const JSON_DOMAIN_ADMINS: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["domain_admins"],
|
||||
|
@ -289,7 +289,7 @@ pub static JSON_DOMAIN_ADMINS: &str = r#"{
|
|||
}"#;
|
||||
|
||||
// This must be the last group to init to include the UUID of the other high priv groups.
|
||||
pub static JSON_IDM_HIGH_PRIVILEGE_V1: &str = r#"{
|
||||
pub const JSON_IDM_HIGH_PRIVILEGE_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["group", "object"],
|
||||
"name": ["idm_high_privilege"],
|
||||
|
@ -322,7 +322,7 @@ pub static JSON_IDM_HIGH_PRIVILEGE_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_SYSTEM_INFO_V1: &str = r#"{
|
||||
pub const JSON_SYSTEM_INFO_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["object", "system_info", "system"],
|
||||
"uuid": ["00000000-0000-0000-0000-ffffff000001"],
|
||||
|
@ -331,7 +331,7 @@ pub static JSON_SYSTEM_INFO_V1: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_DOMAIN_INFO_V1: &str = r#"{
|
||||
pub const JSON_DOMAIN_INFO_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["object", "domain_info", "system"],
|
||||
"name": ["domain_local"],
|
||||
|
@ -341,7 +341,7 @@ pub static JSON_DOMAIN_INFO_V1: &str = r#"{
|
|||
}"#;
|
||||
|
||||
// Anonymous should be the last object in the range here.
|
||||
pub static JSON_ANONYMOUS_V1: &str = r#"{
|
||||
pub const JSON_ANONYMOUS_V1: &str = r#"{
|
||||
"attrs": {
|
||||
"class": ["account", "object"],
|
||||
"name": ["anonymous"],
|
||||
|
@ -356,7 +356,7 @@ pub static JSON_ANONYMOUS_V1: &str = r#"{
|
|||
|
||||
// ============ TEST DATA ============
|
||||
#[cfg(test)]
|
||||
pub static JSON_TESTPERSON1: &str = r#"{
|
||||
pub const JSON_TESTPERSON1: &str = r#"{
|
||||
"valid": null,
|
||||
"state": null,
|
||||
"attrs": {
|
||||
|
@ -367,7 +367,7 @@ pub static JSON_TESTPERSON1: &str = r#"{
|
|||
}"#;
|
||||
|
||||
#[cfg(test)]
|
||||
pub static JSON_TESTPERSON2: &str = r#"{
|
||||
pub const JSON_TESTPERSON2: &str = r#"{
|
||||
"valid": null,
|
||||
"state": null,
|
||||
"attrs": {
|
||||
|
|
|
@ -13,30 +13,30 @@ pub use crate::constants::system_config::*;
|
|||
pub use crate::constants::uuids::*;
|
||||
|
||||
// Increment this as we add new schema types and values!!!
|
||||
pub static SYSTEM_INDEX_VERSION: i64 = 6;
|
||||
pub const SYSTEM_INDEX_VERSION: i64 = 6;
|
||||
// On test builds, define to 60 seconds
|
||||
#[cfg(test)]
|
||||
pub static PURGE_FREQUENCY: u64 = 60;
|
||||
pub const PURGE_FREQUENCY: u64 = 60;
|
||||
// For production, 10 minutes.
|
||||
#[cfg(not(test))]
|
||||
pub static PURGE_FREQUENCY: u64 = 600;
|
||||
pub const PURGE_FREQUENCY: u64 = 600;
|
||||
|
||||
#[cfg(test)]
|
||||
/// In test, we limit the changelog to 10 minutes.
|
||||
pub static CHANGELOG_MAX_AGE: u64 = 600;
|
||||
pub const CHANGELOG_MAX_AGE: u64 = 600;
|
||||
#[cfg(not(test))]
|
||||
/// A replica may be less than 1 day out of sync and catch up.
|
||||
pub static CHANGELOG_MAX_AGE: u64 = 86400;
|
||||
pub const CHANGELOG_MAX_AGE: u64 = 86400;
|
||||
|
||||
#[cfg(test)]
|
||||
/// In test, we limit the recyclebin to 5 minutes.
|
||||
pub static RECYCLEBIN_MAX_AGE: u64 = 300;
|
||||
pub const RECYCLEBIN_MAX_AGE: u64 = 300;
|
||||
#[cfg(not(test))]
|
||||
/// In production we allow 1 week
|
||||
pub static RECYCLEBIN_MAX_AGE: u64 = 604800;
|
||||
pub const RECYCLEBIN_MAX_AGE: u64 = 604800;
|
||||
|
||||
// 5 minute auth session window.
|
||||
pub static AUTH_SESSION_TIMEOUT: u64 = 300;
|
||||
pub const AUTH_SESSION_TIMEOUT: u64 = 300;
|
||||
// 5 minute mfa reg window
|
||||
pub static MFAREG_SESSION_TIMEOUT: u64 = 300;
|
||||
pub static PW_MIN_LENGTH: usize = 10;
|
||||
pub const MFAREG_SESSION_TIMEOUT: u64 = 300;
|
||||
pub const PW_MIN_LENGTH: usize = 10;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
// Schema uuids start at 00000000-0000-0000-0000-ffff00000000
|
||||
|
||||
// system supplementary
|
||||
pub static JSON_SCHEMA_ATTR_DISPLAYNAME: &str = r#"{
|
||||
pub const JSON_SCHEMA_ATTR_DISPLAYNAME: &str = r#"{
|
||||
"valid": {
|
||||
"uuid": "00000000-0000-0000-0000-ffff00000040"
|
||||
},
|
||||
|
@ -36,7 +36,7 @@ pub static JSON_SCHEMA_ATTR_DISPLAYNAME: &str = r#"{
|
|||
]
|
||||
}
|
||||
}"#;
|
||||
pub static JSON_SCHEMA_ATTR_MAIL: &str = r#"
|
||||
pub const JSON_SCHEMA_ATTR_MAIL: &str = r#"
|
||||
{
|
||||
"valid": {
|
||||
"uuid": "00000000-0000-0000-0000-ffff00000041"
|
||||
|
@ -72,7 +72,7 @@ pub static JSON_SCHEMA_ATTR_MAIL: &str = r#"
|
|||
}
|
||||
}
|
||||
"#;
|
||||
pub static JSON_SCHEMA_ATTR_SSH_PUBLICKEY: &str = r#"
|
||||
pub const JSON_SCHEMA_ATTR_SSH_PUBLICKEY: &str = r#"
|
||||
{
|
||||
"valid": {
|
||||
"uuid": "00000000-0000-0000-0000-ffff00000042"
|
||||
|
@ -106,7 +106,7 @@ pub static JSON_SCHEMA_ATTR_SSH_PUBLICKEY: &str = r#"
|
|||
}
|
||||
}
|
||||
"#;
|
||||
pub static JSON_SCHEMA_ATTR_PRIMARY_CREDENTIAL: &str = r#"
|
||||
pub const JSON_SCHEMA_ATTR_PRIMARY_CREDENTIAL: &str = r#"
|
||||
{
|
||||
"valid": {
|
||||
"uuid": "00000000-0000-0000-0000-ffff00000043"
|
||||
|
@ -140,7 +140,7 @@ pub static JSON_SCHEMA_ATTR_PRIMARY_CREDENTIAL: &str = r#"
|
|||
}
|
||||
}
|
||||
"#;
|
||||
pub static JSON_SCHEMA_ATTR_LEGALNAME: &str = r#"{
|
||||
pub const JSON_SCHEMA_ATTR_LEGALNAME: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -170,7 +170,7 @@ pub static JSON_SCHEMA_ATTR_LEGALNAME: &str = r#"{
|
|||
]
|
||||
}
|
||||
}"#;
|
||||
pub static JSON_SCHEMA_ATTR_RADIUS_SECRET: &str = r#"{
|
||||
pub const JSON_SCHEMA_ATTR_RADIUS_SECRET: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -199,7 +199,7 @@ pub static JSON_SCHEMA_ATTR_RADIUS_SECRET: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_SCHEMA_ATTR_DOMAIN_NAME: &str = r#"{
|
||||
pub const JSON_SCHEMA_ATTR_DOMAIN_NAME: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -229,7 +229,7 @@ pub static JSON_SCHEMA_ATTR_DOMAIN_NAME: &str = r#"{
|
|||
]
|
||||
}
|
||||
}"#;
|
||||
pub static JSON_SCHEMA_ATTR_DOMAIN_UUID: &str = r#"{
|
||||
pub const JSON_SCHEMA_ATTR_DOMAIN_UUID: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -259,7 +259,7 @@ pub static JSON_SCHEMA_ATTR_DOMAIN_UUID: &str = r#"{
|
|||
]
|
||||
}
|
||||
}"#;
|
||||
pub static JSON_SCHEMA_ATTR_DOMAIN_SSID: &str = r#"{
|
||||
pub const JSON_SCHEMA_ATTR_DOMAIN_SSID: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -288,7 +288,7 @@ pub static JSON_SCHEMA_ATTR_DOMAIN_SSID: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_SCHEMA_ATTR_GIDNUMBER: &str = r#"{
|
||||
pub const JSON_SCHEMA_ATTR_GIDNUMBER: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -319,7 +319,7 @@ pub static JSON_SCHEMA_ATTR_GIDNUMBER: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_SCHEMA_ATTR_BADLIST_PASSWORD: &str = r#"{
|
||||
pub const JSON_SCHEMA_ATTR_BADLIST_PASSWORD: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -348,7 +348,7 @@ pub static JSON_SCHEMA_ATTR_BADLIST_PASSWORD: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_SCHEMA_ATTR_LOGINSHELL: &str = r#"{
|
||||
pub const JSON_SCHEMA_ATTR_LOGINSHELL: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -377,7 +377,7 @@ pub static JSON_SCHEMA_ATTR_LOGINSHELL: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_SCHEMA_ATTR_UNIX_PASSWORD: &str = r#"{
|
||||
pub const JSON_SCHEMA_ATTR_UNIX_PASSWORD: &str = r#"{
|
||||
"attrs": {
|
||||
"class": [
|
||||
"object",
|
||||
|
@ -406,7 +406,7 @@ pub static JSON_SCHEMA_ATTR_UNIX_PASSWORD: &str = r#"{
|
|||
}
|
||||
}"#;
|
||||
|
||||
pub static JSON_SCHEMA_CLASS_PERSON: &str = r#"
|
||||
pub const JSON_SCHEMA_CLASS_PERSON: &str = r#"
|
||||
{
|
||||
"valid": {
|
||||
"uuid": "00000000-0000-0000-0000-ffff00000044"
|
||||
|
@ -439,7 +439,7 @@ pub static JSON_SCHEMA_CLASS_PERSON: &str = r#"
|
|||
}
|
||||
"#;
|
||||
|
||||
pub static JSON_SCHEMA_CLASS_GROUP: &str = r#"
|
||||
pub const JSON_SCHEMA_CLASS_GROUP: &str = r#"
|
||||
{
|
||||
"valid": {
|
||||
"uuid": "00000000-0000-0000-0000-ffff00000045"
|
||||
|
@ -470,7 +470,7 @@ pub static JSON_SCHEMA_CLASS_GROUP: &str = r#"
|
|||
}
|
||||
}
|
||||
"#;
|
||||
pub static JSON_SCHEMA_CLASS_ACCOUNT: &str = r#"
|
||||
pub const JSON_SCHEMA_CLASS_ACCOUNT: &str = r#"
|
||||
{
|
||||
"attrs": {
|
||||
"class": [
|
||||
|
@ -506,7 +506,7 @@ pub static JSON_SCHEMA_CLASS_ACCOUNT: &str = r#"
|
|||
// domain_name <- should be the dns name?
|
||||
// domain_ssid <- for radius
|
||||
//
|
||||
pub static JSON_SCHEMA_CLASS_DOMAIN_INFO: &str = r#"
|
||||
pub const JSON_SCHEMA_CLASS_DOMAIN_INFO: &str = r#"
|
||||
{
|
||||
"attrs": {
|
||||
"class": [
|
||||
|
@ -535,7 +535,7 @@ pub static JSON_SCHEMA_CLASS_DOMAIN_INFO: &str = r#"
|
|||
}
|
||||
"#;
|
||||
|
||||
pub static JSON_SCHEMA_CLASS_POSIXGROUP: &str = r#"
|
||||
pub const JSON_SCHEMA_CLASS_POSIXGROUP: &str = r#"
|
||||
{
|
||||
"attrs": {
|
||||
"class": [
|
||||
|
@ -559,7 +559,7 @@ pub static JSON_SCHEMA_CLASS_POSIXGROUP: &str = r#"
|
|||
}
|
||||
"#;
|
||||
|
||||
pub static JSON_SCHEMA_CLASS_POSIXACCOUNT: &str = r#"
|
||||
pub const JSON_SCHEMA_CLASS_POSIXACCOUNT: &str = r#"
|
||||
{
|
||||
"attrs": {
|
||||
"class": [
|
||||
|
@ -587,7 +587,7 @@ pub static JSON_SCHEMA_CLASS_POSIXACCOUNT: &str = r#"
|
|||
}
|
||||
"#;
|
||||
|
||||
pub static JSON_SCHEMA_CLASS_SYSTEM_CONFIG: &str = r#"
|
||||
pub const JSON_SCHEMA_CLASS_SYSTEM_CONFIG: &str = r#"
|
||||
{
|
||||
"attrs": {
|
||||
"class": [
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
// This is seperated because the password badlist section may become very long
|
||||
pub static JSON_SYSTEM_CONFIG_V1: &str = r####"{
|
||||
pub const JSON_SYSTEM_CONFIG_V1: &str = r####"{
|
||||
"attrs": {
|
||||
"class": ["object", "system_config", "system"],
|
||||
"uuid": ["00000000-0000-0000-0000-ffffff000027"],
|
||||
|
|
|
@ -1,151 +1,150 @@
|
|||
use uuid::Uuid;
|
||||
|
||||
// Built in group and account ranges.
|
||||
pub static STR_UUID_ADMIN: &str = "00000000-0000-0000-0000-000000000000";
|
||||
pub static _UUID_IDM_ADMINS: &str = "00000000-0000-0000-0000-000000000001";
|
||||
pub static _UUID_IDM_PEOPLE_READ_PRIV: &str = "00000000-0000-0000-0000-000000000002";
|
||||
pub static _UUID_IDM_PEOPLE_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000003";
|
||||
pub static _UUID_IDM_GROUP_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000004";
|
||||
pub static _UUID_IDM_ACCOUNT_READ_PRIV: &str = "00000000-0000-0000-0000-000000000005";
|
||||
pub static _UUID_IDM_ACCOUNT_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000006";
|
||||
pub static _UUID_IDM_RADIUS_SERVERS: &str = "00000000-0000-0000-0000-000000000007";
|
||||
pub static _UUID_IDM_HP_ACCOUNT_READ_PRIV: &str = "00000000-0000-0000-0000-000000000008";
|
||||
pub static _UUID_IDM_HP_ACCOUNT_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000009";
|
||||
pub static _UUID_IDM_SCHEMA_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000010";
|
||||
pub static _UUID_IDM_ACP_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000011";
|
||||
pub static _UUID_IDM_HP_GROUP_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000012";
|
||||
pub static _UUID_IDM_PEOPLE_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000013";
|
||||
pub static _UUID_IDM_ACCOUNT_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000014";
|
||||
pub static _UUID_IDM_GROUP_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000015";
|
||||
pub static _UUID_IDM_HP_ACCOUNT_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000016";
|
||||
pub static _UUID_IDM_HP_GROUP_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000017";
|
||||
pub static _UUID_IDM_ADMIN_V1: &str = "00000000-0000-0000-0000-000000000018";
|
||||
pub static _UUID_SYSTEM_ADMINS: &str = "00000000-0000-0000-0000-000000000019";
|
||||
pub const STR_UUID_ADMIN: &str = "00000000-0000-0000-0000-000000000000";
|
||||
pub const _UUID_IDM_ADMINS: &str = "00000000-0000-0000-0000-000000000001";
|
||||
pub const _UUID_IDM_PEOPLE_READ_PRIV: &str = "00000000-0000-0000-0000-000000000002";
|
||||
pub const _UUID_IDM_PEOPLE_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000003";
|
||||
pub const _UUID_IDM_GROUP_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000004";
|
||||
pub const _UUID_IDM_ACCOUNT_READ_PRIV: &str = "00000000-0000-0000-0000-000000000005";
|
||||
pub const _UUID_IDM_ACCOUNT_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000006";
|
||||
pub const _UUID_IDM_RADIUS_SERVERS: &str = "00000000-0000-0000-0000-000000000007";
|
||||
pub const _UUID_IDM_HP_ACCOUNT_READ_PRIV: &str = "00000000-0000-0000-0000-000000000008";
|
||||
pub const _UUID_IDM_HP_ACCOUNT_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000009";
|
||||
pub const _UUID_IDM_SCHEMA_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000010";
|
||||
pub const _UUID_IDM_ACP_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000011";
|
||||
pub const _UUID_IDM_HP_GROUP_WRITE_PRIV: &str = "00000000-0000-0000-0000-000000000012";
|
||||
pub const _UUID_IDM_PEOPLE_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000013";
|
||||
pub const _UUID_IDM_ACCOUNT_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000014";
|
||||
pub const _UUID_IDM_GROUP_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000015";
|
||||
pub const _UUID_IDM_HP_ACCOUNT_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000016";
|
||||
pub const _UUID_IDM_HP_GROUP_MANAGE_PRIV: &str = "00000000-0000-0000-0000-000000000017";
|
||||
pub const _UUID_IDM_ADMIN_V1: &str = "00000000-0000-0000-0000-000000000018";
|
||||
pub const _UUID_SYSTEM_ADMINS: &str = "00000000-0000-0000-0000-000000000019";
|
||||
// TODO
|
||||
pub static UUID_DOMAIN_ADMINS: &str = "00000000-0000-0000-0000-000000000020";
|
||||
pub static _UUID_IDM_ACCOUNT_UNIX_EXTEND_PRIV: &str = "00000000-0000-0000-0000-000000000021";
|
||||
pub static _UUID_IDM_GROUP_UNIX_EXTEND_PRIV: &str = "00000000-0000-0000-0000-000000000022";
|
||||
pub static _UUID_IDM_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV: &str =
|
||||
pub const UUID_DOMAIN_ADMINS: &str = "00000000-0000-0000-0000-000000000020";
|
||||
pub const _UUID_IDM_ACCOUNT_UNIX_EXTEND_PRIV: &str = "00000000-0000-0000-0000-000000000021";
|
||||
pub const _UUID_IDM_GROUP_UNIX_EXTEND_PRIV: &str = "00000000-0000-0000-0000-000000000022";
|
||||
pub const _UUID_IDM_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV: &str =
|
||||
"00000000-0000-0000-0000-000000000023";
|
||||
pub static _UUID_IDM_PEOPLE_EXTEND_PRIV: &str = "00000000-0000-0000-0000-000000000024";
|
||||
pub const _UUID_IDM_PEOPLE_EXTEND_PRIV: &str = "00000000-0000-0000-0000-000000000024";
|
||||
//
|
||||
pub static _UUID_IDM_HIGH_PRIVILEGE: &str = "00000000-0000-0000-0000-000000001000";
|
||||
pub const _UUID_IDM_HIGH_PRIVILEGE: &str = "00000000-0000-0000-0000-000000001000";
|
||||
|
||||
// Builtin schema
|
||||
pub static UUID_SCHEMA_ATTR_CLASS: &str = "00000000-0000-0000-0000-ffff00000000";
|
||||
pub static UUID_SCHEMA_ATTR_UUID: &str = "00000000-0000-0000-0000-ffff00000001";
|
||||
pub static UUID_SCHEMA_ATTR_NAME: &str = "00000000-0000-0000-0000-ffff00000002";
|
||||
pub static UUID_SCHEMA_ATTR_SPN: &str = "00000000-0000-0000-0000-ffff00000003";
|
||||
pub static UUID_SCHEMA_ATTR_DESCRIPTION: &str = "00000000-0000-0000-0000-ffff00000004";
|
||||
pub static UUID_SCHEMA_ATTR_MULTIVALUE: &str = "00000000-0000-0000-0000-ffff00000005";
|
||||
pub static UUID_SCHEMA_ATTR_UNIQUE: &str = "00000000-0000-0000-0000-ffff00000047";
|
||||
pub static UUID_SCHEMA_ATTR_INDEX: &str = "00000000-0000-0000-0000-ffff00000006";
|
||||
pub static UUID_SCHEMA_ATTR_SYNTAX: &str = "00000000-0000-0000-0000-ffff00000007";
|
||||
pub static UUID_SCHEMA_ATTR_SYSTEMMAY: &str = "00000000-0000-0000-0000-ffff00000008";
|
||||
pub static UUID_SCHEMA_ATTR_MAY: &str = "00000000-0000-0000-0000-ffff00000009";
|
||||
pub static UUID_SCHEMA_ATTR_SYSTEMMUST: &str = "00000000-0000-0000-0000-ffff00000010";
|
||||
pub static UUID_SCHEMA_ATTR_MUST: &str = "00000000-0000-0000-0000-ffff00000011";
|
||||
pub static UUID_SCHEMA_ATTR_MEMBEROF: &str = "00000000-0000-0000-0000-ffff00000012";
|
||||
pub static UUID_SCHEMA_ATTR_MEMBER: &str = "00000000-0000-0000-0000-ffff00000013";
|
||||
pub static UUID_SCHEMA_ATTR_DIRECTMEMBEROF: &str = "00000000-0000-0000-0000-ffff00000014";
|
||||
pub static UUID_SCHEMA_ATTR_VERSION: &str = "00000000-0000-0000-0000-ffff00000015";
|
||||
pub static UUID_SCHEMA_ATTR_DOMAIN: &str = "00000000-0000-0000-0000-ffff00000016";
|
||||
pub static UUID_SCHEMA_ATTR_ACP_ENABLE: &str = "00000000-0000-0000-0000-ffff00000017";
|
||||
pub static UUID_SCHEMA_ATTR_ACP_RECEIVER: &str = "00000000-0000-0000-0000-ffff00000018";
|
||||
pub static UUID_SCHEMA_ATTR_ACP_TARGETSCOPE: &str = "00000000-0000-0000-0000-ffff00000019";
|
||||
pub static UUID_SCHEMA_ATTR_ACP_SEARCH_ATTR: &str = "00000000-0000-0000-0000-ffff00000020";
|
||||
pub static UUID_SCHEMA_ATTR_ACP_CREATE_CLASS: &str = "00000000-0000-0000-0000-ffff00000021";
|
||||
pub static UUID_SCHEMA_ATTR_ACP_CREATE_ATTR: &str = "00000000-0000-0000-0000-ffff00000022";
|
||||
pub static UUID_SCHEMA_ATTR_ACP_MODIFY_REMOVEDATTR: &str = "00000000-0000-0000-0000-ffff00000023";
|
||||
pub static UUID_SCHEMA_ATTR_ACP_MODIFY_PRESENTATTR: &str = "00000000-0000-0000-0000-ffff00000024";
|
||||
pub static UUID_SCHEMA_ATTR_ACP_MODIFY_CLASS: &str = "00000000-0000-0000-0000-ffff00000025";
|
||||
pub static UUID_SCHEMA_CLASS_ATTRIBUTETYPE: &str = "00000000-0000-0000-0000-ffff00000026";
|
||||
pub static UUID_SCHEMA_CLASS_CLASSTYPE: &str = "00000000-0000-0000-0000-ffff00000027";
|
||||
pub static UUID_SCHEMA_CLASS_OBJECT: &str = "00000000-0000-0000-0000-ffff00000028";
|
||||
pub static UUID_SCHEMA_CLASS_EXTENSIBLEOBJECT: &str = "00000000-0000-0000-0000-ffff00000029";
|
||||
pub static UUID_SCHEMA_CLASS_MEMBEROF: &str = "00000000-0000-0000-0000-ffff00000030";
|
||||
pub static UUID_SCHEMA_CLASS_RECYCLED: &str = "00000000-0000-0000-0000-ffff00000031";
|
||||
pub static UUID_SCHEMA_CLASS_TOMBSTONE: &str = "00000000-0000-0000-0000-ffff00000032";
|
||||
pub static UUID_SCHEMA_CLASS_SYSTEM_INFO: &str = "00000000-0000-0000-0000-ffff00000033";
|
||||
pub static UUID_SCHEMA_CLASS_ACCESS_CONTROL_PROFILE: &str = "00000000-0000-0000-0000-ffff00000034";
|
||||
pub static UUID_SCHEMA_CLASS_ACCESS_CONTROL_SEARCH: &str = "00000000-0000-0000-0000-ffff00000035";
|
||||
pub static UUID_SCHEMA_CLASS_ACCESS_CONTROL_DELETE: &str = "00000000-0000-0000-0000-ffff00000036";
|
||||
pub static UUID_SCHEMA_CLASS_ACCESS_CONTROL_MODIFY: &str = "00000000-0000-0000-0000-ffff00000037";
|
||||
pub static UUID_SCHEMA_CLASS_ACCESS_CONTROL_CREATE: &str = "00000000-0000-0000-0000-ffff00000038";
|
||||
pub static UUID_SCHEMA_CLASS_SYSTEM: &str = "00000000-0000-0000-0000-ffff00000039";
|
||||
pub static UUID_SCHEMA_ATTR_DISPLAYNAME: &str = "00000000-0000-0000-0000-ffff00000040";
|
||||
pub static UUID_SCHEMA_ATTR_MAIL: &str = "00000000-0000-0000-0000-ffff00000041";
|
||||
pub static UUID_SCHEMA_ATTR_SSH_PUBLICKEY: &str = "00000000-0000-0000-0000-ffff00000042";
|
||||
pub static UUID_SCHEMA_ATTR_PRIMARY_CREDENTIAL: &str = "00000000-0000-0000-0000-ffff00000043";
|
||||
pub static UUID_SCHEMA_CLASS_PERSON: &str = "00000000-0000-0000-0000-ffff00000044";
|
||||
pub static UUID_SCHEMA_CLASS_GROUP: &str = "00000000-0000-0000-0000-ffff00000045";
|
||||
pub static UUID_SCHEMA_CLASS_ACCOUNT: &str = "00000000-0000-0000-0000-ffff00000046";
|
||||
pub const UUID_SCHEMA_ATTR_CLASS: &str = "00000000-0000-0000-0000-ffff00000000";
|
||||
pub const UUID_SCHEMA_ATTR_UUID: &str = "00000000-0000-0000-0000-ffff00000001";
|
||||
pub const UUID_SCHEMA_ATTR_NAME: &str = "00000000-0000-0000-0000-ffff00000002";
|
||||
pub const UUID_SCHEMA_ATTR_SPN: &str = "00000000-0000-0000-0000-ffff00000003";
|
||||
pub const UUID_SCHEMA_ATTR_DESCRIPTION: &str = "00000000-0000-0000-0000-ffff00000004";
|
||||
pub const UUID_SCHEMA_ATTR_MULTIVALUE: &str = "00000000-0000-0000-0000-ffff00000005";
|
||||
pub const UUID_SCHEMA_ATTR_UNIQUE: &str = "00000000-0000-0000-0000-ffff00000047";
|
||||
pub const UUID_SCHEMA_ATTR_INDEX: &str = "00000000-0000-0000-0000-ffff00000006";
|
||||
pub const UUID_SCHEMA_ATTR_SYNTAX: &str = "00000000-0000-0000-0000-ffff00000007";
|
||||
pub const UUID_SCHEMA_ATTR_SYSTEMMAY: &str = "00000000-0000-0000-0000-ffff00000008";
|
||||
pub const UUID_SCHEMA_ATTR_MAY: &str = "00000000-0000-0000-0000-ffff00000009";
|
||||
pub const UUID_SCHEMA_ATTR_SYSTEMMUST: &str = "00000000-0000-0000-0000-ffff00000010";
|
||||
pub const UUID_SCHEMA_ATTR_MUST: &str = "00000000-0000-0000-0000-ffff00000011";
|
||||
pub const UUID_SCHEMA_ATTR_MEMBEROF: &str = "00000000-0000-0000-0000-ffff00000012";
|
||||
pub const UUID_SCHEMA_ATTR_MEMBER: &str = "00000000-0000-0000-0000-ffff00000013";
|
||||
pub const UUID_SCHEMA_ATTR_DIRECTMEMBEROF: &str = "00000000-0000-0000-0000-ffff00000014";
|
||||
pub const UUID_SCHEMA_ATTR_VERSION: &str = "00000000-0000-0000-0000-ffff00000015";
|
||||
pub const UUID_SCHEMA_ATTR_DOMAIN: &str = "00000000-0000-0000-0000-ffff00000016";
|
||||
pub const UUID_SCHEMA_ATTR_ACP_ENABLE: &str = "00000000-0000-0000-0000-ffff00000017";
|
||||
pub const UUID_SCHEMA_ATTR_ACP_RECEIVER: &str = "00000000-0000-0000-0000-ffff00000018";
|
||||
pub const UUID_SCHEMA_ATTR_ACP_TARGETSCOPE: &str = "00000000-0000-0000-0000-ffff00000019";
|
||||
pub const UUID_SCHEMA_ATTR_ACP_SEARCH_ATTR: &str = "00000000-0000-0000-0000-ffff00000020";
|
||||
pub const UUID_SCHEMA_ATTR_ACP_CREATE_CLASS: &str = "00000000-0000-0000-0000-ffff00000021";
|
||||
pub const UUID_SCHEMA_ATTR_ACP_CREATE_ATTR: &str = "00000000-0000-0000-0000-ffff00000022";
|
||||
pub const UUID_SCHEMA_ATTR_ACP_MODIFY_REMOVEDATTR: &str = "00000000-0000-0000-0000-ffff00000023";
|
||||
pub const UUID_SCHEMA_ATTR_ACP_MODIFY_PRESENTATTR: &str = "00000000-0000-0000-0000-ffff00000024";
|
||||
pub const UUID_SCHEMA_ATTR_ACP_MODIFY_CLASS: &str = "00000000-0000-0000-0000-ffff00000025";
|
||||
pub const UUID_SCHEMA_CLASS_ATTRIBUTETYPE: &str = "00000000-0000-0000-0000-ffff00000026";
|
||||
pub const UUID_SCHEMA_CLASS_CLASSTYPE: &str = "00000000-0000-0000-0000-ffff00000027";
|
||||
pub const UUID_SCHEMA_CLASS_OBJECT: &str = "00000000-0000-0000-0000-ffff00000028";
|
||||
pub const UUID_SCHEMA_CLASS_EXTENSIBLEOBJECT: &str = "00000000-0000-0000-0000-ffff00000029";
|
||||
pub const UUID_SCHEMA_CLASS_MEMBEROF: &str = "00000000-0000-0000-0000-ffff00000030";
|
||||
pub const UUID_SCHEMA_CLASS_RECYCLED: &str = "00000000-0000-0000-0000-ffff00000031";
|
||||
pub const UUID_SCHEMA_CLASS_TOMBSTONE: &str = "00000000-0000-0000-0000-ffff00000032";
|
||||
pub const UUID_SCHEMA_CLASS_SYSTEM_INFO: &str = "00000000-0000-0000-0000-ffff00000033";
|
||||
pub const UUID_SCHEMA_CLASS_ACCESS_CONTROL_PROFILE: &str = "00000000-0000-0000-0000-ffff00000034";
|
||||
pub const UUID_SCHEMA_CLASS_ACCESS_CONTROL_SEARCH: &str = "00000000-0000-0000-0000-ffff00000035";
|
||||
pub const UUID_SCHEMA_CLASS_ACCESS_CONTROL_DELETE: &str = "00000000-0000-0000-0000-ffff00000036";
|
||||
pub const UUID_SCHEMA_CLASS_ACCESS_CONTROL_MODIFY: &str = "00000000-0000-0000-0000-ffff00000037";
|
||||
pub const UUID_SCHEMA_CLASS_ACCESS_CONTROL_CREATE: &str = "00000000-0000-0000-0000-ffff00000038";
|
||||
pub const UUID_SCHEMA_CLASS_SYSTEM: &str = "00000000-0000-0000-0000-ffff00000039";
|
||||
pub const UUID_SCHEMA_ATTR_DISPLAYNAME: &str = "00000000-0000-0000-0000-ffff00000040";
|
||||
pub const UUID_SCHEMA_ATTR_MAIL: &str = "00000000-0000-0000-0000-ffff00000041";
|
||||
pub const UUID_SCHEMA_ATTR_SSH_PUBLICKEY: &str = "00000000-0000-0000-0000-ffff00000042";
|
||||
pub const UUID_SCHEMA_ATTR_PRIMARY_CREDENTIAL: &str = "00000000-0000-0000-0000-ffff00000043";
|
||||
pub const UUID_SCHEMA_CLASS_PERSON: &str = "00000000-0000-0000-0000-ffff00000044";
|
||||
pub const UUID_SCHEMA_CLASS_GROUP: &str = "00000000-0000-0000-0000-ffff00000045";
|
||||
pub const UUID_SCHEMA_CLASS_ACCOUNT: &str = "00000000-0000-0000-0000-ffff00000046";
|
||||
// GAP - 47
|
||||
pub static UUID_SCHEMA_ATTR_ATTRIBUTENAME: &str = "00000000-0000-0000-0000-ffff00000048";
|
||||
pub static UUID_SCHEMA_ATTR_CLASSNAME: &str = "00000000-0000-0000-0000-ffff00000049";
|
||||
pub static UUID_SCHEMA_ATTR_LEGALNAME: &str = "00000000-0000-0000-0000-ffff00000050";
|
||||
pub static UUID_SCHEMA_ATTR_RADIUS_SECRET: &str = "00000000-0000-0000-0000-ffff00000051";
|
||||
pub static UUID_SCHEMA_CLASS_DOMAIN_INFO: &str = "00000000-0000-0000-0000-ffff00000052";
|
||||
pub static UUID_SCHEMA_ATTR_DOMAIN_NAME: &str = "00000000-0000-0000-0000-ffff00000053";
|
||||
pub static UUID_SCHEMA_ATTR_DOMAIN_UUID: &str = "00000000-0000-0000-0000-ffff00000054";
|
||||
pub static UUID_SCHEMA_ATTR_DOMAIN_SSID: &str = "00000000-0000-0000-0000-ffff00000055";
|
||||
pub const UUID_SCHEMA_ATTR_ATTRIBUTENAME: &str = "00000000-0000-0000-0000-ffff00000048";
|
||||
pub const UUID_SCHEMA_ATTR_CLASSNAME: &str = "00000000-0000-0000-0000-ffff00000049";
|
||||
pub const UUID_SCHEMA_ATTR_LEGALNAME: &str = "00000000-0000-0000-0000-ffff00000050";
|
||||
pub const UUID_SCHEMA_ATTR_RADIUS_SECRET: &str = "00000000-0000-0000-0000-ffff00000051";
|
||||
pub const UUID_SCHEMA_CLASS_DOMAIN_INFO: &str = "00000000-0000-0000-0000-ffff00000052";
|
||||
pub const UUID_SCHEMA_ATTR_DOMAIN_NAME: &str = "00000000-0000-0000-0000-ffff00000053";
|
||||
pub const UUID_SCHEMA_ATTR_DOMAIN_UUID: &str = "00000000-0000-0000-0000-ffff00000054";
|
||||
pub const UUID_SCHEMA_ATTR_DOMAIN_SSID: &str = "00000000-0000-0000-0000-ffff00000055";
|
||||
|
||||
pub static UUID_SCHEMA_ATTR_GIDNUMBER: &str = "00000000-0000-0000-0000-ffff00000056";
|
||||
pub static UUID_SCHEMA_CLASS_POSIXACCOUNT: &str = "00000000-0000-0000-0000-ffff00000057";
|
||||
pub static UUID_SCHEMA_CLASS_POSIXGROUP: &str = "00000000-0000-0000-0000-ffff00000058";
|
||||
pub static UUID_SCHEMA_ATTR_BADLIST_PASSWORD: &str = "00000000-0000-0000-0000-ffff00000059";
|
||||
pub static UUID_SCHEMA_CLASS_SYSTEM_CONFIG: &str = "00000000-0000-0000-0000-ffff00000060";
|
||||
pub static UUID_SCHEMA_ATTR_LOGINSHELL: &str = "00000000-0000-0000-0000-ffff00000061";
|
||||
pub static UUID_SCHEMA_ATTR_UNIX_PASSWORD: &str = "00000000-0000-0000-0000-ffff00000062";
|
||||
pub static UUID_SCHEMA_ATTR_LAST_MOD_CID: &str = "00000000-0000-0000-0000-ffff00000063";
|
||||
pub static UUID_SCHEMA_ATTR_PHANTOM: &str = "00000000-0000-0000-0000-ffff00000064";
|
||||
pub static UUID_SCHEMA_ATTR_CLAIM: &str = "00000000-0000-0000-0000-ffff00000065";
|
||||
pub static UUID_SCHEMA_ATTR_PASSWORD_IMPORT: &str = "00000000-0000-0000-0000-ffff00000066";
|
||||
pub const UUID_SCHEMA_ATTR_GIDNUMBER: &str = "00000000-0000-0000-0000-ffff00000056";
|
||||
pub const UUID_SCHEMA_CLASS_POSIXACCOUNT: &str = "00000000-0000-0000-0000-ffff00000057";
|
||||
pub const UUID_SCHEMA_CLASS_POSIXGROUP: &str = "00000000-0000-0000-0000-ffff00000058";
|
||||
pub const UUID_SCHEMA_ATTR_BADLIST_PASSWORD: &str = "00000000-0000-0000-0000-ffff00000059";
|
||||
pub const UUID_SCHEMA_CLASS_SYSTEM_CONFIG: &str = "00000000-0000-0000-0000-ffff00000060";
|
||||
pub const UUID_SCHEMA_ATTR_LOGINSHELL: &str = "00000000-0000-0000-0000-ffff00000061";
|
||||
pub const UUID_SCHEMA_ATTR_UNIX_PASSWORD: &str = "00000000-0000-0000-0000-ffff00000062";
|
||||
pub const UUID_SCHEMA_ATTR_LAST_MOD_CID: &str = "00000000-0000-0000-0000-ffff00000063";
|
||||
pub const UUID_SCHEMA_ATTR_PHANTOM: &str = "00000000-0000-0000-0000-ffff00000064";
|
||||
pub const UUID_SCHEMA_ATTR_CLAIM: &str = "00000000-0000-0000-0000-ffff00000065";
|
||||
pub const UUID_SCHEMA_ATTR_PASSWORD_IMPORT: &str = "00000000-0000-0000-0000-ffff00000066";
|
||||
|
||||
// System and domain infos
|
||||
// I'd like to strongly criticise william of the past for fucking up these allocations.
|
||||
pub static _UUID_SYSTEM_INFO: &str = "00000000-0000-0000-0000-ffffff000001";
|
||||
pub static UUID_DOMAIN_INFO: &str = "00000000-0000-0000-0000-ffffff000025";
|
||||
pub const _UUID_SYSTEM_INFO: &str = "00000000-0000-0000-0000-ffffff000001";
|
||||
pub const UUID_DOMAIN_INFO: &str = "00000000-0000-0000-0000-ffffff000025";
|
||||
// DO NOT allocate here, allocate below.
|
||||
|
||||
// Access controls
|
||||
// skip 00 / 01 - see system info
|
||||
pub static _UUID_IDM_ADMINS_ACP_RECYCLE_SEARCH_V1: &str = "00000000-0000-0000-0000-ffffff000002";
|
||||
pub static _UUID_IDM_ADMINS_ACP_REVIVE_V1: &str = "00000000-0000-0000-0000-ffffff000003";
|
||||
pub static _UUID_IDM_SELF_ACP_READ_V1: &str = "00000000-0000-0000-0000-ffffff000004";
|
||||
pub static _UUID_IDM_ALL_ACP_READ_V1: &str = "00000000-0000-0000-0000-ffffff000006";
|
||||
pub static _UUID_IDM_ACP_PEOPLE_READ_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000007";
|
||||
pub static _UUID_IDM_ACP_PEOPLE_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000008";
|
||||
pub static _UUID_IDM_ACP_GROUP_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000009";
|
||||
pub static _UUID_IDM_ACP_ACCOUNT_READ_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000010";
|
||||
pub static _UUID_IDM_ACP_ACCOUNT_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000011";
|
||||
pub static _UUID_IDM_ACP_ACCOUNT_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000012";
|
||||
pub static _UUID_IDM_ACP_PEOPLE_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000013";
|
||||
pub static _UUID_IDM_ACP_RADIUS_SERVERS_V1: &str = "00000000-0000-0000-0000-ffffff000014";
|
||||
pub static _UUID_IDM_ACP_HP_ACCOUNT_READ_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000015";
|
||||
pub static _UUID_IDM_ACP_HP_ACCOUNT_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000016";
|
||||
pub static _UUID_IDM_ACP_HP_GROUP_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000017";
|
||||
pub static _UUID_IDM_ACP_SCHEMA_WRITE_ATTRS_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000018";
|
||||
pub static _UUID_IDM_ACP_ACP_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000019";
|
||||
pub static _UUID_IDM_ACP_SCHEMA_WRITE_CLASSES_PRIV_V1: &str =
|
||||
"00000000-0000-0000-0000-ffffff000020";
|
||||
pub static _UUID_IDM_SELF_ACP_WRITE_V1: &str = "00000000-0000-0000-0000-ffffff000021";
|
||||
pub static _UUID_IDM_ACP_GROUP_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000022";
|
||||
pub static _UUID_IDM_ACP_HP_ACCOUNT_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000023";
|
||||
pub static _UUID_IDM_ACP_HP_GROUP_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000024";
|
||||
pub const _UUID_IDM_ADMINS_ACP_RECYCLE_SEARCH_V1: &str = "00000000-0000-0000-0000-ffffff000002";
|
||||
pub const _UUID_IDM_ADMINS_ACP_REVIVE_V1: &str = "00000000-0000-0000-0000-ffffff000003";
|
||||
pub const _UUID_IDM_SELF_ACP_READ_V1: &str = "00000000-0000-0000-0000-ffffff000004";
|
||||
pub const _UUID_IDM_ALL_ACP_READ_V1: &str = "00000000-0000-0000-0000-ffffff000006";
|
||||
pub const _UUID_IDM_ACP_PEOPLE_READ_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000007";
|
||||
pub const _UUID_IDM_ACP_PEOPLE_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000008";
|
||||
pub const _UUID_IDM_ACP_GROUP_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000009";
|
||||
pub const _UUID_IDM_ACP_ACCOUNT_READ_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000010";
|
||||
pub const _UUID_IDM_ACP_ACCOUNT_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000011";
|
||||
pub const _UUID_IDM_ACP_ACCOUNT_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000012";
|
||||
pub const _UUID_IDM_ACP_PEOPLE_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000013";
|
||||
pub const _UUID_IDM_ACP_RADIUS_SERVERS_V1: &str = "00000000-0000-0000-0000-ffffff000014";
|
||||
pub const _UUID_IDM_ACP_HP_ACCOUNT_READ_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000015";
|
||||
pub const _UUID_IDM_ACP_HP_ACCOUNT_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000016";
|
||||
pub const _UUID_IDM_ACP_HP_GROUP_WRITE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000017";
|
||||
pub const _UUID_IDM_ACP_SCHEMA_WRITE_ATTRS_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000018";
|
||||
pub const _UUID_IDM_ACP_ACP_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000019";
|
||||
pub const _UUID_IDM_ACP_SCHEMA_WRITE_CLASSES_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000020";
|
||||
pub const _UUID_IDM_SELF_ACP_WRITE_V1: &str = "00000000-0000-0000-0000-ffffff000021";
|
||||
pub const _UUID_IDM_ACP_GROUP_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000022";
|
||||
pub const _UUID_IDM_ACP_HP_ACCOUNT_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000023";
|
||||
pub const _UUID_IDM_ACP_HP_GROUP_MANAGE_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000024";
|
||||
// Skip 25 - see domain info.
|
||||
pub static UUID_IDM_ACP_DOMAIN_ADMIN_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000026";
|
||||
pub static STR_UUID_SYSTEM_CONFIG: &str = "00000000-0000-0000-0000-ffffff000027";
|
||||
pub static UUID_IDM_ACP_SYSTEM_CONFIG_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000028";
|
||||
pub static _UUID_IDM_ACP_ACCOUNT_UNIX_EXTEND_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000029";
|
||||
pub static _UUID_IDM_ACP_GROUP_UNIX_EXTEND_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000030";
|
||||
pub static _UUID_IDM_ACP_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV_V1: &str =
|
||||
pub const UUID_IDM_ACP_DOMAIN_ADMIN_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000026";
|
||||
pub const STR_UUID_SYSTEM_CONFIG: &str = "00000000-0000-0000-0000-ffffff000027";
|
||||
pub const UUID_IDM_ACP_SYSTEM_CONFIG_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000028";
|
||||
pub const _UUID_IDM_ACP_ACCOUNT_UNIX_EXTEND_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000029";
|
||||
pub const _UUID_IDM_ACP_GROUP_UNIX_EXTEND_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000030";
|
||||
pub const _UUID_IDM_ACP_PEOPLE_ACCOUNT_PASSWORD_IMPORT_PRIV_V1: &str =
|
||||
"00000000-0000-0000-0000-ffffff000031";
|
||||
pub static _UUID_IDM_ACP_PEOPLE_EXTEND_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000032";
|
||||
pub const _UUID_IDM_ACP_PEOPLE_EXTEND_PRIV_V1: &str = "00000000-0000-0000-0000-ffffff000032";
|
||||
|
||||
// End of system ranges
|
||||
pub static STR_UUID_DOES_NOT_EXIST: &str = "00000000-0000-0000-0000-fffffffffffe";
|
||||
pub static STR_UUID_ANONYMOUS: &str = "00000000-0000-0000-0000-ffffffffffff";
|
||||
pub const STR_UUID_DOES_NOT_EXIST: &str = "00000000-0000-0000-0000-fffffffffffe";
|
||||
pub const STR_UUID_ANONYMOUS: &str = "00000000-0000-0000-0000-ffffffffffff";
|
||||
|
||||
lazy_static! {
|
||||
pub static ref UUID_ADMIN: Uuid = Uuid::parse_str(STR_UUID_ADMIN).unwrap();
|
||||
|
|
|
@ -359,7 +359,7 @@ impl Entry<EntryInit, EntryNew> {
|
|||
// Just use log directly here, it's testing
|
||||
// str -> proto entry
|
||||
let pe: ProtoEntry = serde_json::from_str(es).expect("Invalid Proto Entry");
|
||||
// use a static map to convert str -> ava
|
||||
// use a const map to convert str -> ava
|
||||
let x: BTreeMap<String, BTreeSet<Value>> = pe.attrs.into_iter()
|
||||
.map(|(k, vs)| {
|
||||
let attr = k.to_lowercase();
|
||||
|
|
|
@ -24,7 +24,7 @@ use uuid::Uuid;
|
|||
|
||||
// Default filter is safe, ignores all hidden types!
|
||||
|
||||
// This is &Value so we can lazy static then clone, but perhaps we can reconsider
|
||||
// This is &Value so we can lazy const then clone, but perhaps we can reconsider
|
||||
// later if this should just take Value.
|
||||
#[allow(dead_code)]
|
||||
pub fn f_eq(a: &str, v: PartialValue) -> FC {
|
||||
|
|
|
@ -702,10 +702,10 @@ mod tests {
|
|||
use std::time::Duration;
|
||||
use uuid::Uuid;
|
||||
|
||||
static TEST_PASSWORD: &'static str = "ntaoeuntnaoeuhraohuercahu😍";
|
||||
static TEST_PASSWORD_INC: &'static str = "ntaoentu nkrcgaeunhibwmwmqj;k wqjbkx ";
|
||||
static TEST_CURRENT_TIME: u64 = 6000;
|
||||
static TEST_CURRENT_EXPIRE: u64 = TEST_CURRENT_TIME + AUTH_SESSION_TIMEOUT + 1;
|
||||
const TEST_PASSWORD: &'static str = "ntaoeuntnaoeuhraohuercahu😍";
|
||||
const TEST_PASSWORD_INC: &'static str = "ntaoentu nkrcgaeunhibwmwmqj;k wqjbkx ";
|
||||
const TEST_CURRENT_TIME: u64 = 6000;
|
||||
const TEST_CURRENT_EXPIRE: u64 = TEST_CURRENT_TIME + AUTH_SESSION_TIMEOUT + 1;
|
||||
|
||||
#[test]
|
||||
fn test_idm_anonymous_auth() {
|
||||
|
|
|
@ -130,8 +130,8 @@ impl Plugin for Base {
|
|||
// Check that the system-protected range is not in the cand_uuid, unless we are
|
||||
// an internal operation.
|
||||
if !ce.event.is_internal() {
|
||||
// TODO: We can't lazy static this as you can't borrow the type down to what
|
||||
// range and contains on btreeset need, but can we possibly make these staticly
|
||||
// TODO: We can't lazy const this as you can't borrow the type down to what
|
||||
// range and contains on btreeset need, but can we possibly make these constly
|
||||
// part of the struct somehow at init. rather than needing to parse a lot?
|
||||
// The internal set is bounded by: UUID_ADMIN -> UUID_ANONYMOUS
|
||||
// Sadly we need to allocate these to strings to make references, sigh.
|
||||
|
@ -275,7 +275,7 @@ mod tests {
|
|||
use crate::value::{PartialValue, Value};
|
||||
use kanidm_proto::v1::{OperationError, PluginError};
|
||||
|
||||
static JSON_ADMIN_ALLOW_ALL: &'static str = r#"{
|
||||
const JSON_ADMIN_ALLOW_ALL: &'static str = r#"{
|
||||
"valid": null,
|
||||
"state": null,
|
||||
"attrs": {
|
||||
|
|
|
@ -16,10 +16,10 @@ use kanidm_proto::v1::OperationError;
|
|||
/// Systemd dynamic units allocate between 61184–65519, most distros allocate
|
||||
/// system uids from 0 - 1000, and many others give user ids between 1000 to
|
||||
/// 2000. This whole numberspace is cursed, lets assume it's not ours. :(
|
||||
static GID_SYSTEM_NUMBER_MIN: u32 = 65536;
|
||||
const GID_SYSTEM_NUMBER_MIN: u32 = 65536;
|
||||
|
||||
/// This is the normal system range, we MUST NOT allow it to be allocated.
|
||||
static GID_SAFETY_NUMBER_MIN: u32 = 1000;
|
||||
const GID_SAFETY_NUMBER_MIN: u32 = 1000;
|
||||
|
||||
lazy_static! {
|
||||
static ref CLASS_POSIXGROUP: PartialValue = PartialValue::new_iutf8s("posixgroup");
|
||||
|
|
|
@ -396,12 +396,12 @@ mod tests {
|
|||
use crate::server::{QueryServerTransaction, QueryServerWriteTransaction};
|
||||
use crate::value::{PartialValue, Value};
|
||||
|
||||
static UUID_A: &'static str = "aaaaaaaa-f82e-4484-a407-181aa03bda5c";
|
||||
static UUID_B: &'static str = "bbbbbbbb-2438-4384-9891-48f4c8172e9b";
|
||||
static UUID_C: &'static str = "cccccccc-9b01-423f-9ba6-51aa4bbd5dd2";
|
||||
static UUID_D: &'static str = "dddddddd-2ab3-48e3-938d-1b4754cd2984";
|
||||
const UUID_A: &'static str = "aaaaaaaa-f82e-4484-a407-181aa03bda5c";
|
||||
const UUID_B: &'static str = "bbbbbbbb-2438-4384-9891-48f4c8172e9b";
|
||||
const UUID_C: &'static str = "cccccccc-9b01-423f-9ba6-51aa4bbd5dd2";
|
||||
const UUID_D: &'static str = "dddddddd-2ab3-48e3-938d-1b4754cd2984";
|
||||
|
||||
static EA: &'static str = r#"{
|
||||
const EA: &'static str = r#"{
|
||||
"valid": null,
|
||||
"state": null,
|
||||
"attrs": {
|
||||
|
@ -411,7 +411,7 @@ mod tests {
|
|||
}
|
||||
}"#;
|
||||
|
||||
static EB: &'static str = r#"{
|
||||
const EB: &'static str = r#"{
|
||||
"valid": null,
|
||||
"state": null,
|
||||
"attrs": {
|
||||
|
@ -421,7 +421,7 @@ mod tests {
|
|||
}
|
||||
}"#;
|
||||
|
||||
static EC: &'static str = r#"{
|
||||
const EC: &'static str = r#"{
|
||||
"valid": null,
|
||||
"state": null,
|
||||
"attrs": {
|
||||
|
@ -431,7 +431,7 @@ mod tests {
|
|||
}
|
||||
}"#;
|
||||
|
||||
static ED: &'static str = r#"{
|
||||
const ED: &'static str = r#"{
|
||||
"valid": null,
|
||||
"state": null,
|
||||
"attrs": {
|
||||
|
|
|
@ -133,9 +133,9 @@ mod tests {
|
|||
use crate::value::{PartialValue, Value};
|
||||
use uuid::Uuid;
|
||||
|
||||
static IMPORT_HASH: &'static str =
|
||||
const IMPORT_HASH: &'static str =
|
||||
"pbkdf2_sha256$36000$xIEozuZVAoYm$uW1b35DUKyhvQAf1mBqMvoBDcqSD06juzyO/nmyV0+w=";
|
||||
// static IMPORT_PASSWORD: &'static str = "eicieY7ahchaoCh0eeTa";
|
||||
// const IMPORT_PASSWORD: &'static str = "eicieY7ahchaoCh0eeTa";
|
||||
|
||||
#[test]
|
||||
fn test_pre_create_password_import_1() {
|
||||
|
|
|
@ -213,7 +213,7 @@ mod tests {
|
|||
use crate::value::{PartialValue, Value};
|
||||
use kanidm_proto::v1::OperationError;
|
||||
|
||||
static JSON_ADMIN_ALLOW_ALL: &'static str = r#"{
|
||||
const JSON_ADMIN_ALLOW_ALL: &'static str = r#"{
|
||||
"valid": null,
|
||||
"state": null,
|
||||
"attrs": {
|
||||
|
|
|
@ -629,7 +629,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("class"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_CLASS)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("The set of classes defining an object"),
|
||||
multivalue: true,
|
||||
unique: false,
|
||||
|
@ -643,7 +643,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("uuid"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_UUID)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("The universal unique id of the object"),
|
||||
multivalue: false,
|
||||
// Uniqueness is handled by base.rs, not attrunique here due to
|
||||
|
@ -659,7 +659,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("last_modified_cid"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_LAST_MOD_CID)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("The cid of the last change to this object"),
|
||||
multivalue: false,
|
||||
// Uniqueness is handled by base.rs, not attrunique here due to
|
||||
|
@ -675,7 +675,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("name"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_NAME)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("The shortform name of an object"),
|
||||
multivalue: false,
|
||||
unique: true,
|
||||
|
@ -689,7 +689,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("spn"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_SPN)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"The service principle name of an object, unique across all domain trusts",
|
||||
),
|
||||
|
@ -705,7 +705,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("attributename"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_ATTRIBUTENAME)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("The name of a schema attribute"),
|
||||
multivalue: false,
|
||||
unique: true,
|
||||
|
@ -719,7 +719,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("classname"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_CLASSNAME)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("The name of a schema class"),
|
||||
multivalue: false,
|
||||
unique: true,
|
||||
|
@ -733,7 +733,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("description"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_DESCRIPTION)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("A description of an attribute, object or class"),
|
||||
multivalue: true,
|
||||
unique: false,
|
||||
|
@ -744,7 +744,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
);
|
||||
self.attributes.insert(String::from("multivalue"), SchemaAttribute {
|
||||
name: String::from("multivalue"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_MULTIVALUE).expect("unable to parse static uuid"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_MULTIVALUE).expect("unable to parse const uuid"),
|
||||
description: String::from("If true, this attribute is able to store multiple values rather than just a single value."),
|
||||
multivalue: false,
|
||||
unique: false,
|
||||
|
@ -754,7 +754,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
});
|
||||
self.attributes.insert(String::from("phantom"), SchemaAttribute {
|
||||
name: String::from("phantom"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_PHANTOM).expect("unable to parse static uuid"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_PHANTOM).expect("unable to parse const uuid"),
|
||||
description: String::from("If true, this attribute must NOT be present in any may/must sets of a class as. This represents generated attributes."),
|
||||
multivalue: false,
|
||||
unique: false,
|
||||
|
@ -764,7 +764,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
});
|
||||
self.attributes.insert(String::from("unique"), SchemaAttribute {
|
||||
name: String::from("unique"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_UNIQUE).expect("unable to parse static uuid"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_UNIQUE).expect("unable to parse const uuid"),
|
||||
description: String::from("If true, this attribute must store a unique value through out the database."),
|
||||
multivalue: false,
|
||||
unique: false,
|
||||
|
@ -777,7 +777,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("index"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_INDEX)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"Describe the indexes to apply to instances of this attribute.",
|
||||
),
|
||||
|
@ -793,7 +793,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("syntax"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_SYNTAX)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"Describe the syntax of this attribute. This affects indexing and sorting.",
|
||||
),
|
||||
|
@ -809,7 +809,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("systemmay"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_SYSTEMMAY)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"A list of system provided optional attributes this class can store.",
|
||||
),
|
||||
|
@ -825,7 +825,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("may"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_MAY)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"A user modifiable list of optional attributes this class can store.",
|
||||
),
|
||||
|
@ -841,7 +841,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("systemmust"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_SYSTEMMUST)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"A list of system provided required attributes this class must store.",
|
||||
),
|
||||
|
@ -857,7 +857,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("must"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_MUST)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"A user modifiable list of required attributes this class must store.",
|
||||
),
|
||||
|
@ -875,7 +875,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("acp_enable"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_ACP_ENABLE)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("A flag to determine if this ACP is active for application. True is enabled, and enforce. False is checked but not enforced."),
|
||||
multivalue: false,
|
||||
unique: false,
|
||||
|
@ -890,7 +890,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("acp_receiver"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_ACP_RECEIVER)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"Who the ACP applies to, constraining or allowing operations.",
|
||||
),
|
||||
|
@ -906,7 +906,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("acp_targetscope"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_ACP_TARGETSCOPE)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"The effective targets of the ACP, IE what will be acted upon.",
|
||||
),
|
||||
|
@ -922,7 +922,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("acp_search_attr"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_ACP_SEARCH_ATTR)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("The attributes that may be viewed or searched by the reciever on targetscope."),
|
||||
multivalue: true,
|
||||
unique: false,
|
||||
|
@ -936,7 +936,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("acp_create_class"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_ACP_CREATE_CLASS)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"The set of classes that can be created on a new entry.",
|
||||
),
|
||||
|
@ -952,7 +952,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("acp_create_attr"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_ACP_CREATE_ATTR)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"The set of attribute types that can be created on an entry.",
|
||||
),
|
||||
|
@ -969,7 +969,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("acp_modify_removedattr"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_ACP_MODIFY_REMOVEDATTR)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("The set of attribute types that could be removed or purged in a modification."),
|
||||
multivalue: true,
|
||||
unique: false,
|
||||
|
@ -983,7 +983,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("acp_modify_presentattr"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_ACP_MODIFY_PRESENTATTR)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("The set of attribute types that could be added or asserted in a modification."),
|
||||
multivalue: true,
|
||||
unique: false,
|
||||
|
@ -997,7 +997,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("acp_modify_class"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_ACP_MODIFY_CLASS)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("The set of class values that could be asserted or added to an entry. Only applies to modify::present operations on class."),
|
||||
multivalue: true,
|
||||
unique: false,
|
||||
|
@ -1012,7 +1012,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("memberof"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_MEMBEROF)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("reverse group membership of the object"),
|
||||
multivalue: true,
|
||||
unique: false,
|
||||
|
@ -1026,7 +1026,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("directmemberof"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_DIRECTMEMBEROF)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("reverse direct group membership of the object"),
|
||||
multivalue: true,
|
||||
unique: false,
|
||||
|
@ -1040,7 +1040,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("member"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_MEMBER)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("List of members of the group"),
|
||||
multivalue: true,
|
||||
unique: false,
|
||||
|
@ -1055,7 +1055,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("version"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_VERSION)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"The systems internal migration version for provided objects",
|
||||
),
|
||||
|
@ -1072,7 +1072,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("domain"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_DOMAIN)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("A DNS Domain name entry."),
|
||||
multivalue: true,
|
||||
unique: false,
|
||||
|
@ -1086,7 +1086,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("claim"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_CLAIM)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("The spn of a claim this entry holds"),
|
||||
multivalue: true,
|
||||
unique: false,
|
||||
|
@ -1100,7 +1100,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaAttribute {
|
||||
name: String::from("password_import"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_PASSWORD_IMPORT)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("An imported password hash from an external system."),
|
||||
multivalue: true,
|
||||
unique: false,
|
||||
|
@ -1115,7 +1115,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaClass {
|
||||
name: String::from("attributetype"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_ATTRIBUTETYPE)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("Definition of a schema attribute"),
|
||||
systemmay: vec![String::from("phantom"), String::from("index")],
|
||||
may: vec![],
|
||||
|
@ -1135,7 +1135,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaClass {
|
||||
name: String::from("classtype"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_CLASSTYPE)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("Definition of a schema classtype"),
|
||||
systemmay: vec![
|
||||
String::from("systemmay"),
|
||||
|
@ -1157,7 +1157,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaClass {
|
||||
name: String::from("object"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_OBJECT)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"A system created class that all objects must contain",
|
||||
),
|
||||
|
@ -1176,7 +1176,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaClass {
|
||||
name: String::from("memberof"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_MEMBEROF)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("Class that is dynamically added to recepients of memberof or directmemberof"),
|
||||
systemmay: vec![
|
||||
"memberof".to_string(),
|
||||
|
@ -1192,7 +1192,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaClass {
|
||||
name: String::from("extensibleobject"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_EXTENSIBLEOBJECT)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"A class type that has green hair and turns off all rules ...",
|
||||
),
|
||||
|
@ -1207,7 +1207,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
String::from("recycled"),
|
||||
SchemaClass {
|
||||
name: String::from("recycled"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_RECYCLED).expect("unable to parse static uuid"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_RECYCLED).expect("unable to parse const uuid"),
|
||||
description: String::from("An object that has been deleted, but still recoverable via the revive operation. Recycled objects are not modifiable, only revivable."),
|
||||
systemmay: vec![],
|
||||
may: vec![],
|
||||
|
@ -1219,7 +1219,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
String::from("tombstone"),
|
||||
SchemaClass {
|
||||
name: String::from("tombstone"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_TOMBSTONE).expect("unable to parse static uuid"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_TOMBSTONE).expect("unable to parse const uuid"),
|
||||
description: String::from("An object that is purged from the recycle bin. This is a system internal state. Tombstones have no attributes beside UUID."),
|
||||
systemmay: vec![],
|
||||
may: vec![],
|
||||
|
@ -1236,7 +1236,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaClass {
|
||||
name: String::from("system_info"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_SYSTEM_INFO)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("System metadata object class"),
|
||||
systemmay: vec![],
|
||||
may: vec![],
|
||||
|
@ -1255,7 +1255,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaClass {
|
||||
name: String::from("access_control_profile"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_ACCESS_CONTROL_PROFILE)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("System Access Control Profile Class"),
|
||||
systemmay: vec!["acp_enable".to_string(), "description".to_string()],
|
||||
may: vec![],
|
||||
|
@ -1272,7 +1272,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaClass {
|
||||
name: String::from("access_control_search"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_ACCESS_CONTROL_SEARCH)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("System Access Control Search Class"),
|
||||
systemmay: vec![],
|
||||
may: vec![],
|
||||
|
@ -1285,7 +1285,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaClass {
|
||||
name: String::from("access_control_delete"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_ACCESS_CONTROL_DELETE)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("System Access Control DELETE Class"),
|
||||
systemmay: vec![],
|
||||
may: vec![],
|
||||
|
@ -1298,7 +1298,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaClass {
|
||||
name: String::from("access_control_modify"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_ACCESS_CONTROL_MODIFY)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("System Access Control Modify Class"),
|
||||
systemmay: vec![
|
||||
"acp_modify_removedattr".to_string(),
|
||||
|
@ -1315,7 +1315,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaClass {
|
||||
name: String::from("access_control_create"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_ACCESS_CONTROL_CREATE)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("System Access Control Create Class"),
|
||||
systemmay: vec![
|
||||
"acp_create_class".to_string(),
|
||||
|
@ -1331,7 +1331,7 @@ impl<'a> SchemaWriteTransaction<'a> {
|
|||
SchemaClass {
|
||||
name: String::from("system"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_CLASS_SYSTEM)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from("A class denoting that a type is system generated and protected. It has special internal behaviour."),
|
||||
systemmay: vec![],
|
||||
may: vec![],
|
||||
|
|
|
@ -1788,7 +1788,7 @@ impl<'a> QueryServerWriteTransaction<'a> {
|
|||
// This function is idempotent
|
||||
pub fn initialise_idm(&mut self, audit: &mut AuditScope) -> Result<(), OperationError> {
|
||||
// First, check the system_info object. This stores some server information
|
||||
// and details. It's a pretty static thing. Also check anonymous, important to many
|
||||
// and details. It's a pretty const thing. Also check anonymous, important to many
|
||||
// concepts.
|
||||
let mut audit_an = AuditScope::new("start_system_core_items");
|
||||
let res = self
|
||||
|
|
|
@ -1422,7 +1422,7 @@ mod tests {
|
|||
let sa = SchemaAttribute {
|
||||
name: String::from("acp_receiver"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_ACP_RECEIVER)
|
||||
.expect("unable to parse static uuid"),
|
||||
.expect("unable to parse const uuid"),
|
||||
description: String::from(
|
||||
"Who the ACP applies to, constraining or allowing operations.",
|
||||
),
|
||||
|
@ -1457,7 +1457,7 @@ mod tests {
|
|||
fn test_schema_normalise_uuid() {
|
||||
let sa = SchemaAttribute {
|
||||
name: String::from("uuid"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_UUID).expect("unable to parse static uuid"),
|
||||
uuid: Uuid::parse_str(UUID_SCHEMA_ATTR_UUID).expect("unable to parse const uuid"),
|
||||
description: String::from("The universal unique id of the object"),
|
||||
multivalue: false,
|
||||
index: vec![IndexType::EQUALITY],
|
||||
|
|
Loading…
Reference in a new issue