Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat(entity-access): role-aware opt-out semantics for CRM thread grant (#3765)

Evan Hutnikdc52c925c7f0
diff --git a/rust/cloud-storage/.sqlx/query-33f91fe23f4aa503e8eea88cb0b14de49b5a047222518939169ac8b36170df61.json b/rust/cloud-storage/.sqlx/query-33f91fe23f4aa503e8eea88cb0b14de49b5a047222518939169ac8b36170df61.json
deleted file mode 100644
index 1755ed40d0..0000000000
--- a/rust/cloud-storage/.sqlx/query-33f91fe23f4aa503e8eea88cb0b14de49b5a047222518939169ac8b36170df61.json
+++ /dev/null
@@ -1,23 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n WITH thread_owner AS (\n SELECT el.macro_id\n FROM email_threads t\n JOIN email_links el ON el.id = t.link_id\n WHERE t.id = $1::uuid\n ),\n shared_teams AS (\n -- Teams the requester shares with the owner that have CRM enabled.\n SELECT tcs.team_id\n FROM team_user requester\n JOIN team_user owner_member ON owner_member.team_id = requester.team_id\n JOIN thread_owner o ON o.macro_id = owner_member.user_id\n JOIN team_crm_settings tcs ON tcs.team_id = requester.team_id\n WHERE requester.user_id = $2\n AND tcs.crm_enabled\n ),\n participants AS (\n -- Distinct addresses across from + to/cc/bcc on the thread.\n SELECT DISTINCT LOWER(ec.email_address) AS email\n FROM email_messages m\n JOIN email_contacts ec ON ec.id = m.from_contact_id\n WHERE m.thread_id = $1::uuid\n UNION\n SELECT DISTINCT LOWER(ec.email_address)\n FROM email_messages m\n JOIN email_message_recipients r ON r.message_id = m.id\n JOIN email_contacts ec ON ec.id = r.contact_id\n WHERE m.thread_id = $1::uuid\n )\n SELECT EXISTS (\n SELECT 1\n FROM shared_teams st\n -- Require at least one *external* participant (outside the\n -- requester's own email domain). Internal colleagues don't\n -- need to be tracked CRM contacts, but a purely-internal\n -- thread shouldn't grant CRM access either.\n WHERE EXISTS (\n SELECT 1\n FROM participants p\n WHERE split_part(p.email, '@', 2) <> split_part(LOWER($2), '@', 2)\n )\n AND NOT EXISTS (\n -- An external participant with no qualifying contact in\n -- this team. Participants on the requester's own domain\n -- are skipped (they're internal, not CRM contacts).\n SELECT 1\n FROM participants p\n WHERE split_part(p.email, '@', 2) <> split_part(LOWER($2), '@', 2)\n AND NOT EXISTS (\n SELECT 1\n FROM crm_contacts ct\n JOIN crm_companies c ON c.id = ct.company_id\n WHERE c.team_id = st.team_id\n AND ct.email = p.email\n AND c.email_sync\n AND NOT c.hidden\n AND NOT ct.hidden\n )\n )\n ) AS \"granted!\"\n ",
- "describe": {
- "columns": [
- {
- "ordinal": 0,
- "name": "granted!",
- "type_info": "Bool"
- }
- ],
- "parameters": {
- "Left": [
- "Uuid",
- "Text"
- ]
- },
- "nullable": [
- null
- ]
- },
- "hash": "33f91fe23f4aa503e8eea88cb0b14de49b5a047222518939169ac8b36170df61"
-}
diff --git a/rust/cloud-storage/.sqlx/query-ddd8755195a3cf6673045d0182a08a933c8e7ac6f811305b607046ae6021be79.json b/rust/cloud-storage/.sqlx/query-ddd8755195a3cf6673045d0182a08a933c8e7ac6f811305b607046ae6021be79.json
new file mode 100644
index 0000000000..7e4b4f4136
--- /dev/null
+++ b/rust/cloud-storage/.sqlx/query-ddd8755195a3cf6673045d0182a08a933c8e7ac6f811305b607046ae6021be79.json
@@ -0,0 +1,23 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "\n WITH thread_owner AS (\n SELECT el.macro_id\n FROM email_threads t\n JOIN email_links el ON el.id = t.link_id\n WHERE t.id = $1::uuid\n ),\n shared_teams AS (\n -- Teams the requester shares with the owner that have CRM enabled.\n SELECT tcs.team_id, requester.team_role\n FROM team_user requester\n JOIN team_user owner_member ON owner_member.team_id = requester.team_id\n JOIN thread_owner o ON o.macro_id = owner_member.user_id\n JOIN team_crm_settings tcs ON tcs.team_id = requester.team_id\n WHERE requester.user_id = $2\n AND tcs.crm_enabled\n ),\n participants AS (\n -- Distinct addresses across from + to/cc/bcc on the thread.\n SELECT DISTINCT LOWER(ec.email_address) AS email\n FROM email_messages m\n JOIN email_contacts ec ON ec.id = m.from_contact_id\n WHERE m.thread_id = $1::uuid\n UNION\n SELECT DISTINCT LOWER(ec.email_address)\n FROM email_messages m\n JOIN email_message_recipients r ON r.message_id = m.id\n JOIN email_contacts ec ON ec.id = r.contact_id\n WHERE m.thread_id = $1::uuid\n )\n SELECT EXISTS (\n SELECT 1\n FROM shared_teams st\n -- Require at least one *external* participant (outside the\n -- requester's own email domain). A purely-internal thread\n -- shouldn't grant CRM access.\n WHERE EXISTS (\n SELECT 1\n FROM participants p\n WHERE split_part(p.email, '@', 2) <> split_part(LOWER($2), '@', 2)\n )\n AND NOT EXISTS (\n -- An external participant flagged for opt-out on this\n -- team. email_sync=false blocks everyone; hidden flags\n -- only block plain members.\n SELECT 1\n FROM participants p\n JOIN crm_contacts ct ON ct.email = p.email\n JOIN crm_companies c ON c.id = ct.company_id\n WHERE c.team_id = st.team_id\n AND split_part(p.email, '@', 2) <> split_part(LOWER($2), '@', 2)\n AND (\n NOT c.email_sync\n OR (\n (ct.hidden OR c.hidden)\n AND st.team_role = 'member'\n )\n )\n )\n ) AS \"granted!\"\n ",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "granted!",
+ "type_info": "Bool"
+ }
+ ],
+ "parameters": {
+ "Left": [
+ "Uuid",
+ "Text"
+ ]
+ },
+ "nullable": [
+ null
+ ]
+ },
+ "hash": "ddd8755195a3cf6673045d0182a08a933c8e7ac6f811305b607046ae6021be79"
+}
diff --git a/rust/cloud-storage/entity_access/src/outbound/pg_access_repo/queries/thread_access.rs b/rust/cloud-storage/entity_access/src/outbound/pg_access_repo/queries/thread_access.rs
index e178dea19e..cb0825b6fd 100644
--- a/rust/cloud-storage/entity_access/src/outbound/pg_access_repo/queries/thread_access.rs
+++ b/rust/cloud-storage/entity_access/src/outbound/pg_access_repo/queries/thread_access.rs
@@ -105,10 +105,19 @@ pub async fn get_thread_access(
.fetch_all(pool);
// Team CRM access: a teammate of the thread owner gets Comment access when
- // they share a CRM-enabled team with the owner AND every participant
- // (from/to/cc/bcc) resolves to a non-hidden crm_contacts row whose
- // non-hidden crm_companies row has email_sync on. Strict: any participant
- // without a qualifying contact in that team denies access.
+ // they share a CRM-enabled team with the owner, the thread has at least
+ // one external participant, and no external participant carries an
+ // opt-out signal on that team.
+ //
+ // Opt-out signals are role-aware:
+ // * email_sync=false on a tracked company is a HARD opt-out — the
+ // team explicitly suppressed CRM email sync for that company, and
+ // no role (member, admin, or owner) can see threads through CRM
+ // grant for participants tracked there.
+ // * contact.hidden or company.hidden is a SOFT opt-out — admins and
+ // owners see hidden CRM rows; only plain members are blocked.
+ //
+ // Untracked external addresses default to allowed.
let crm_fut = sqlx::query_scalar!(
r#"
WITH thread_owner AS (
@@ -119,7 +128,7 @@ pub async fn get_thread_access(
),
shared_teams AS (
-- Teams the requester shares with the owner that have CRM enabled.
- SELECT tcs.team_id
+ SELECT tcs.team_id, requester.team_role
FROM team_user requester
JOIN team_user owner_member ON owner_member.team_id = requester.team_id
JOIN thread_owner o ON o.macro_id = owner_member.user_id
@@ -144,31 +153,30 @@ pub async fn get_thread_access(
SELECT 1
FROM shared_teams st
-- Require at least one *external* participant (outside the
- -- requester's own email domain). Internal colleagues don't
- -- need to be tracked CRM contacts, but a purely-internal
- -- thread shouldn't grant CRM access either.
+ -- requester's own email domain). A purely-internal thread
+ -- shouldn't grant CRM access.
WHERE EXISTS (
SELECT 1
FROM participants p
WHERE split_part(p.email, '@', 2) <> split_part(LOWER($2), '@', 2)
)
AND NOT EXISTS (
- -- An external participant with no qualifying contact in
- -- this team. Participants on the requester's own domain
- -- are skipped (they're internal, not CRM contacts).
+ -- An external participant flagged for opt-out on this
+ -- team. email_sync=false blocks everyone; hidden flags
+ -- only block plain members.
SELECT 1
FROM participants p
- WHERE split_part(p.email, '@', 2) <> split_part(LOWER($2), '@', 2)
- AND NOT EXISTS (
- SELECT 1
- FROM crm_contacts ct
- JOIN crm_companies c ON c.id = ct.company_id
- WHERE c.team_id = st.team_id
- AND ct.email = p.email
- AND c.email_sync
- AND NOT c.hidden
- AND NOT ct.hidden
- )
+ JOIN crm_contacts ct ON ct.email = p.email
+ JOIN crm_companies c ON c.id = ct.company_id
+ WHERE c.team_id = st.team_id
+ AND split_part(p.email, '@', 2) <> split_part(LOWER($2), '@', 2)
+ AND (
+ NOT c.email_sync
+ OR (
+ (ct.hidden OR c.hidden)
+ AND st.team_role = 'member'
+ )
+ )
)
) AS "granted!"
"#,
diff --git a/rust/cloud-storage/entity_access/src/outbound/pg_access_repo/queries/thread_access/test.rs b/rust/cloud-storage/entity_access/src/outbound/pg_access_repo/queries/thread_access/test.rs
index d1e78ef244..b640d72625 100644
--- a/rust/cloud-storage/entity_access/src/outbound/pg_access_repo/queries/thread_access/test.rs
+++ b/rust/cloud-storage/entity_access/src/outbound/pg_access_repo/queries/thread_access/test.rs
@@ -84,10 +84,17 @@ async fn insert_team(pool: &PgPool, team_id: Uuid, owner_user_id: &str, crm_enab
}
async fn add_team_member(pool: &PgPool, team_id: Uuid, user_id: &str) {
+ add_team_user(pool, team_id, user_id, "member").await;
+}
+
+/// `role` must be one of `'member' | 'admin' | 'owner'`.
+async fn add_team_user(pool: &PgPool, team_id: Uuid, user_id: &str, role: &str) {
sqlx::query!(
- r#"INSERT INTO team_user (user_id, team_id, team_role) VALUES ($1, $2, 'member')"#,
+ r#"INSERT INTO team_user (user_id, team_id, team_role)
+ VALUES ($1, $2, $3::text::team_role)"#,
user_id,
team_id,
+ role,
)
.execute(pool)
.await
@@ -232,25 +239,32 @@ async fn insert_crm_contact(pool: &PgPool, company_id: Uuid, email: &str, hidden
.unwrap();
}
-/// OWNER + REQUESTER on the same team (with a CRM settings row).
+/// OWNER + REQUESTER on the same team (with a CRM settings row). Both joined
+/// as plain members — use [`setup_shared_team_as`] when the requester's role
+/// matters (admin/owner can see hidden CRM rows; member cannot).
async fn setup_shared_team(pool: &PgPool, crm_enabled: bool) -> Uuid {
+ setup_shared_team_as(pool, crm_enabled, "member").await
+}
+
+async fn setup_shared_team_as(pool: &PgPool, crm_enabled: bool, requester_role: &str) -> Uuid {
let team_id = Uuid::new_v4();
insert_user(pool, OWNER, "[email protected]").await;
insert_user(pool, REQUESTER, "[email protected]").await;
insert_team(pool, team_id, OWNER, crm_enabled).await;
add_team_member(pool, team_id, OWNER).await;
- add_team_member(pool, team_id, REQUESTER).await;
+ add_team_user(pool, team_id, REQUESTER, requester_role).await;
team_id
}
/// Synced CRM team + thread where every participant resolves to a non-hidden
-/// contact in a synced+visible company, EXCEPT `unsynced`, which gets no CRM
-/// contact. Used to prove each address slot (from/to/cc/bcc) is enforced.
-async fn access_with_one_unsynced(
+/// contact in a synced+visible company, EXCEPT `untracked`, which gets no CRM
+/// contact at all. Used to prove untracked addresses don't deny access in any
+/// slot (from/to/cc/bcc).
+async fn access_with_one_untracked(
pool: &PgPool,
from_email: &str,
recipients: &[(&str, &str)],
- unsynced: &str,
+ untracked: &str,
) -> Option<AccessLevel> {
let team_id = setup_shared_team(pool, true).await;
let thread_id = create_thread(pool, OWNER, from_email, recipients).await;
@@ -259,7 +273,7 @@ async fn access_with_one_unsynced(
let mut all = vec![from_email];
all.extend(recipients.iter().map(|(e, _)| *e));
for email in all {
- if email != unsynced {
+ if email != untracked {
insert_crm_contact(pool, company, email, false).await;
}
}
@@ -458,11 +472,11 @@ async fn grants_when_synced_participants_span_multiple_messages(
}
#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
-async fn grants_when_participant_has_qualifying_mapping_despite_hidden_duplicate(
- pool: PgPool,
-) -> anyhow::Result<()> {
- // Same address resolves to two contacts in the team: one hidden, one valid.
- // The existence semantics grant as long as a qualifying mapping exists.
+async fn denies_when_any_duplicate_contact_signals_opt_out(pool: PgPool) -> anyhow::Result<()> {
+ // Same address resolves to two contacts on the team: one hidden + in a
+ // hidden company (opt-out), one clean. The opt-out signal wins — explicit
+ // suppression on any tracked row denies even when a clean duplicate
+ // exists.
let team_id = setup_shared_team(&pool, true).await;
let thread_id = create_thread(&pool, OWNER, "[email protected]", &[]).await;
@@ -472,10 +486,7 @@ async fn grants_when_participant_has_qualifying_mapping_despite_hidden_duplicate
let good_company = insert_crm_company(&pool, team_id, true, false).await;
insert_crm_contact(&pool, good_company, "[email protected]", false).await;
- assert_eq!(
- access_as_requester(&pool, &thread_id).await,
- Some(AccessLevel::Comment)
- );
+ assert_eq!(access_as_requester(&pool, &thread_id).await, None);
Ok(())
}
@@ -587,12 +598,12 @@ async fn denies_when_team_crm_settings_row_missing(pool: PgPool) -> anyhow::Resu
}
#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
-async fn denies_when_contact_belongs_to_a_different_teams_company(
+async fn grants_when_only_contact_for_participant_is_on_a_different_team(
pool: PgPool,
) -> anyhow::Result<()> {
- // alice resolves to a contact, but only under a company owned by a team the
- // requester is not on. The shared team has no mapping for her → deny.
- // Shared CRM-enabled team for owner + requester, but it has no alice contact.
+ // alice is tracked only on a team the requester is not on. The shared
+ // team has no opt-out signal for her, and untracked external addresses
+ // default to allowed → grant.
let _shared_team = setup_shared_team(&pool, true).await;
let thread_id = create_thread(&pool, OWNER, "[email protected]", &[]).await;
@@ -602,7 +613,10 @@ async fn denies_when_contact_belongs_to_a_different_teams_company(
let other_company = insert_crm_company(&pool, other_team, true, false).await;
insert_crm_contact(&pool, other_company, "[email protected]", false).await;
- assert_eq!(access_as_requester(&pool, &thread_id).await, None);
+ assert_eq!(
+ access_as_requester(&pool, &thread_id).await,
+ Some(AccessLevel::Comment)
+ );
Ok(())
}
@@ -673,65 +687,136 @@ async fn denies_when_a_contact_is_hidden(pool: PgPool) -> anyhow::Result<()> {
}
// ---------------------------------------------------------------------------
-// Strict: an unsynced participant in ANY address slot denies access
+// Role-aware opt-out semantics: admins/owners see through `hidden`, but
+// `email_sync=false` is a hard suppression that blocks every role.
+// ---------------------------------------------------------------------------
+
+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
+async fn admin_grants_despite_hidden_contact(pool: PgPool) -> anyhow::Result<()> {
+ let team_id = setup_shared_team_as(&pool, true, "admin").await;
+ let thread_id = create_thread(&pool, OWNER, "[email protected]", &[]).await;
+ let company = insert_crm_company(&pool, team_id, true, false).await;
+ insert_crm_contact(&pool, company, "[email protected]", true).await;
+
+ assert_eq!(
+ access_as_requester(&pool, &thread_id).await,
+ Some(AccessLevel::Comment)
+ );
+ Ok(())
+}
+
+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
+async fn admin_grants_despite_hidden_company(pool: PgPool) -> anyhow::Result<()> {
+ let team_id = setup_shared_team_as(&pool, true, "admin").await;
+ let thread_id = create_thread(&pool, OWNER, "[email protected]", &[]).await;
+ let company = insert_crm_company(&pool, team_id, true, true).await;
+ insert_crm_contact(&pool, company, "[email protected]", false).await;
+
+ assert_eq!(
+ access_as_requester(&pool, &thread_id).await,
+ Some(AccessLevel::Comment)
+ );
+ Ok(())
+}
+
+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
+async fn owner_grants_despite_hidden_contact_and_company(pool: PgPool) -> anyhow::Result<()> {
+ let team_id = setup_shared_team_as(&pool, true, "owner").await;
+ let thread_id = create_thread(&pool, OWNER, "[email protected]", &[]).await;
+ let company = insert_crm_company(&pool, team_id, true, true).await;
+ insert_crm_contact(&pool, company, "[email protected]", true).await;
+
+ assert_eq!(
+ access_as_requester(&pool, &thread_id).await,
+ Some(AccessLevel::Comment)
+ );
+ Ok(())
+}
+
+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
+async fn admin_denied_when_email_sync_off(pool: PgPool) -> anyhow::Result<()> {
+ // email_sync=false is a hard suppression — even admins/owners can't see
+ // threads through CRM grant for participants tracked in such companies.
+ let team_id = setup_shared_team_as(&pool, true, "admin").await;
+ let thread_id = create_thread(&pool, OWNER, "[email protected]", &[]).await;
+ let company = insert_crm_company(&pool, team_id, false, false).await;
+ insert_crm_contact(&pool, company, "[email protected]", false).await;
+
+ assert_eq!(access_as_requester(&pool, &thread_id).await, None);
+ Ok(())
+}
+
+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
+async fn owner_denied_when_email_sync_off(pool: PgPool) -> anyhow::Result<()> {
+ let team_id = setup_shared_team_as(&pool, true, "owner").await;
+ let thread_id = create_thread(&pool, OWNER, "[email protected]", &[]).await;
+ let company = insert_crm_company(&pool, team_id, false, false).await;
+ insert_crm_contact(&pool, company, "[email protected]", false).await;
+
+ assert_eq!(access_as_requester(&pool, &thread_id).await, None);
+ Ok(())
+}
+
+// ---------------------------------------------------------------------------
+// Untracked external participants don't deny access (in any address slot)
// ---------------------------------------------------------------------------
#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
-async fn denies_when_the_from_sender_is_unsynced(pool: PgPool) -> anyhow::Result<()> {
- let result = access_with_one_unsynced(
+async fn grants_when_the_from_sender_is_untracked(pool: PgPool) -> anyhow::Result<()> {
+ let result = access_with_one_untracked(
&pool,
&[("[email protected]", "TO")],
)
.await;
- assert_eq!(result, None);
+ assert_eq!(result, Some(AccessLevel::Comment));
Ok(())
}
#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
-async fn denies_when_a_to_participant_is_unsynced(pool: PgPool) -> anyhow::Result<()> {
- let result = access_with_one_unsynced(
+async fn grants_when_a_to_participant_is_untracked(pool: PgPool) -> anyhow::Result<()> {
+ let result = access_with_one_untracked(
&pool,
&[("[email protected]", "TO")],
)
.await;
- assert_eq!(result, None);
+ assert_eq!(result, Some(AccessLevel::Comment));
Ok(())
}
#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
-async fn denies_when_a_cc_participant_is_unsynced(pool: PgPool) -> anyhow::Result<()> {
- let result = access_with_one_unsynced(
+async fn grants_when_a_cc_participant_is_untracked(pool: PgPool) -> anyhow::Result<()> {
+ let result = access_with_one_untracked(
&pool,
&[("[email protected]", "CC")],
)
.await;
- assert_eq!(result, None);
+ assert_eq!(result, Some(AccessLevel::Comment));
Ok(())
}
#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
-async fn denies_when_a_bcc_participant_is_unsynced(pool: PgPool) -> anyhow::Result<()> {
- let result = access_with_one_unsynced(
+async fn grants_when_a_bcc_participant_is_untracked(pool: PgPool) -> anyhow::Result<()> {
+ let result = access_with_one_untracked(
&pool,
&[("[email protected]", "BCC")],
)
.await;
- assert_eq!(result, None);
+ assert_eq!(result, Some(AccessLevel::Comment));
Ok(())
}
#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
-async fn denies_when_unsynced_participant_in_a_later_message(pool: PgPool) -> anyhow::Result<()> {
- // First message is fully synced; a second message introduces an unsynced
- // participant. Strict deny must still apply.
+async fn grants_when_untracked_participant_in_a_later_message(pool: PgPool) -> anyhow::Result<()> {
+ // A later message introduces an untracked external participant. Without
+ // an opt-out signal the grant still holds.
let team_id = setup_shared_team(&pool, true).await;
let (link_id, thread_id) = create_link_and_thread(&pool, OWNER).await;
add_message(
@@ -755,9 +840,33 @@ async fn denies_when_unsynced_participant_in_a_later_message(pool: PgPool) -> an
insert_crm_contact(&pool, company, email, false).await;
}
- // [email protected] intentionally absent from CRM.
+ // [email protected] intentionally absent from CRM — untracked, not opted-out.
- assert_eq!(access_as_requester(&pool, &thread_id).await, None);
+ assert_eq!(
+ access_as_requester(&pool, &thread_id).await,
+ Some(AccessLevel::Comment)
+ );
+ Ok(())
+}
+
+#[sqlx::test(migrator = "MACRO_DB_MIGRATIONS")]
+async fn grants_when_no_external_participant_is_tracked_at_all(pool: PgPool) -> anyhow::Result<()> {
+ // Brand-new external folks (no CRM rows yet) on a CRM-enabled team —
+ // grant. This is the typical "Evan opens a teammate's thread with new
+ // outside addresses" case.
+ let _team_id = setup_shared_team(&pool, true).await;
+ let thread_id = create_thread(
+ &pool,
+ OWNER,
+ &[("[email protected]", "TO"), ("[email protected]", "CC")],
+ )
+ .await;
+
+ assert_eq!(
+ access_as_requester(&pool, &thread_id).await,
+ Some(AccessLevel::Comment)
+ );
Ok(())
}