import export rbac2
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user