question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Process values in template, alias filter

See original GitHub issue

The need is to process LDAP values while rendering role or grant parameters. This would looks like:

- role:
    name: '{cn.slugify()}'

The trick is to subclass string values with a extended class implementing various filter.

Filters idea

  • upper, lower -> natives.
  • slugify : escape for Posgres native.

Tasks

  • Implementation
  • Documentation

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
bersacecommented, May 10, 2019

@zurikus

How could be multiple filters applied at once?

Filters are chainable: {cn.filter0().filter1()}. I could even manage to not require () with a bit of magic.

Let’s wait for some more feedback on this. Maybe a cookbook section on this subject would help.

0reactions
bersacecommented, Nov 5, 2019

I’m closing, post processing in ldap2pg what can’t be done in pg_hba is useless. Thanks for the issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Add a method to compute alias names for index templates
I was hoping for an alias name, computed/based on a field's value. 5
Read more >
Template::Manual::Filters
The eval filter evaluates the block as template text, processing any directives embedded within it. This allows template variables to contain ...
Read more >
Create or update index template API | Elasticsearch Guide [8.5]
Index templates define settings, mappings, and aliases that can be applied automatically ... All indices for the alias must have the same is_hidden...
Read more >
Jinja Documentation (3.0.x) » Template Designer ...
Filters are separated from the variable by a pipe symbol ( | ) and may have ... The value returned from the method...
Read more >
Template Variables - Datadog Docs
Template variables allow you to dynamically filter one or more widgets in a dashboard. Create. To create your first template variable in the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found