pub fn unless_uid<'reg, 'rc>(
h: &Helper<'reg, 'rc>,
r: &'reg Handlebars<'reg>,
ctx: &'rc Context,
rc: &mut RenderContext<'reg, 'rc>,
out: &mut dyn Output,
) -> HelperResultExpand description
A templating helper that tests if current user’s effective uid matches
a set of given integer(s). It is the negated version of if_uid.
Usage:
-
{{#unless_uid "1000,1001"}}..foo..{{/unless_uid}}Renders
..foo..only if current user’s effective uid is neither1000nor1001. -
{{#unless_uid 0}}..foo..{{else}}..bar..{{/unless_uid}}Renders
..foo..only if current user’s effective uid is NOT0, renders..bar..only if current user’s effective uid is0. -
{{#unless_uid some.array}}..foo..{{/unless_uid}}Renders
..foo..only if current user’s effective uid is none of the values from the templating variablesome.array(defined in the config file’s [[context]] section).
[[context]]: dt_core::config::ContextConfig