Skip to main content

get_templates

Function get_templates 

Source
pub fn get_templates() -> &'static [PolicyTemplate]
Expand description

Get all available policy templates.

Templates are composable and additive: each policy apply-template adds the template’s rules to the running policy via Casbin’s add_policies / add_grouping_policies (deduplicating, so repeat application is idempotent). Operators can layer templates as needed — e.g. cimd-open + public-inference + ttt.user.

No template removes rules. To revoke a previously-applied template operators use policy edit to remove the lines, or policy rollback <ref> to restore an earlier commit.