import export rbac2

This commit is contained in:
Priec
2026-08-15 19:57:09 +02:00
parent e15b2681fd
commit 6c303b5b6f
12 changed files with 76 additions and 45 deletions

View File

@@ -91,6 +91,10 @@ pub(crate) fn starter_grants(
grants.push((object, action));
}
}
// Bulk transfer applies to tables, not to journals, which the
// transfer pages never offer.
grants.push(("data:*", "export"));
grants.push(("data:*", "import"));
Ok(grants)
}
other => Err(tr!(
@@ -122,7 +126,9 @@ mod tests {
}
assert_eq!(starter_grants(locale, "read").unwrap().len(), 3);
assert_eq!(starter_grants(locale, "full").unwrap().len(), 9);
// Four row actions on two wildcard objects, ECB read, and the two
// transfer actions, which apply to tables alone.
assert_eq!(starter_grants(locale, "full").unwrap().len(), 11);
}
#[test]