Skip to content

Conversation

@arnaudlevy
Copy link
Member

No description provided.

@arnaudlevy
Copy link
Member Author

@pabois il manque les droits stp !

Les admins et les responsables de sites doivent pouvoir modifier les modèles.
Tout le monde doit pouvoir les voir (et créer un objet à partir, mais je crois que c'est automatique).

@arnaudlevy arnaudlevy marked this pull request as ready for review January 15, 2026 14:30
@arnaudlevy
Copy link
Member Author

@pabois j'ai fait :)

arnaudlevy and others added 11 commits January 16, 2026 10:44
Co-authored-by: Sébastien Gaya <sebastien.gaya@gmail.com>
Co-authored-by: Sébastien Gaya <sebastien.gaya@gmail.com>
Co-authored-by: Sébastien Gaya <sebastien.gaya@gmail.com>
Co-authored-by: Sébastien Gaya <sebastien.gaya@gmail.com>
Co-authored-by: Sébastien Gaya <sebastien.gaya@gmail.com>
raise "Object with id #{params[:template_id]} is not a template." unless self.template.is_template?
# Prevent stealing template from another instance
raise "Object with id #{params[:template_id]} is from a different instance." if self.template.university != current_university
template_record = self.class.unscoped.templates.where(university_id: current_university.id).find(params[:template_id])
Copy link
Member Author

Choose a reason for hiding this comment

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

c'est cool ça !

'id', # The localization created is new
'slug', # The slug will depend on the new title
'created_at', # The creation date is not inherited
'updated_at' # The update date is not inherited
Copy link
Member Author

Choose a reason for hiding this comment

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

ah oui très juste

Copy link
Member Author

Choose a reason for hiding this comment

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

et on a pas des updated_by_id?

@arnaudlevy arnaudlevy merged commit ee5aa25 into main Jan 16, 2026
8 checks passed
@arnaudlevy arnaudlevy deleted the templates branch January 16, 2026 11:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants