Skip to main content

component_permissions

Function component_permissions 

Source
pub fn component_permissions() -> ComponentPermissionsBuilder
Expand description

Builder for ComponentPermissions.

Construct via the generated builder rather than positional arguments so that the three same-typed MetadataPolicyProto arguments (insert/update/delete) can’t be accidentally swapped at the call site:

let perms = component_permissions()
    .insert(allow_policy)
    .update(admin_only_policy)
    .delete(super_admin_only_policy)
    .call();