pub fn assert_create_permission(
permission: &Permission,
caller: Principal,
controllers: &Controllers,
) -> bool
Expand description
If a document or asset is about to be created for the first time, it can be initialized without further rules unless the collection is set as controller and the caller is not a controller. This can be useful e.g. when a collection read permission is set to public but only the administrator can add content.