Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #37189 - Registration before & after snippets #10059

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

stejskalleos
Copy link
Contributor

before_registration & after_registration snippets allow users to add their code to the template without directly editing it.

before_registration & after_registration snippets allow
users to add their code to the template without directly editing it.
Copy link
Contributor

@nofaralfasi nofaralfasi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
I also suggest adding it to the documentation.

@stejskalleos stejskalleos merged commit 5dedfde into theforeman:develop Feb 26, 2024
22 of 26 checks passed
@maximiliankolb
Copy link
Contributor

Hey @stejskalleos

I like the idea as previously expressed during discussions/reviews in foreman-documentation. However, why did you go with these names and not "Global Registration custom pre" and "... post"?

$ rg custom
...
app/views/unattended/provisioning_templates/finish/kickstart_default_finish.erb
35:<%= snippet_if_exists(template_name + " custom pre") -%>
83:<%= snippet_if_exists(template_name + " custom post") -%>
...
same for Preseed/AutoYaSt templates

@stejskalleos
Copy link
Contributor Author

However, why did you go with these names and not "Global Registration custom pre" and "... post"?

I liked before_registration more than Global Registration custom pre. I wanted to do it the same way as the Rails callbacks.

@ekohl
Copy link
Member

ekohl commented Mar 5, 2024

My objection is that now they're not alphabetically sorted together. A suffix will naturally group them together when you browse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants