This is done via a custom PATCH due to the lack of transactions of MongoDB;
we cannot undelete both project-referenced files and file-referenced
projects in one atomic operation.
By refactoring part of comments_for_node into a dedicated function called render_comments_for_node, we enable Pillar apps to override the comment url and determine in each app what are the conditions that allow a user to post.
Further, we introduce an extensible and overridable list_embed.pug, which currently defines custom blocks for when the user is allowed and not allowed to post a comment,
This actually undoes commits 90c62664a6 and 18fe240b93 and simply adds the node.url property when rendering a post in the posts_view function. This is what the template macro actually expected in the first place.
This affects the user and notifications menus. It happens for two reasons:
- the only argument passed to the macros was current_user, which is always available
- we want to enable overriding and adding items to the menus via extensions
At the moment only the user menu takes advantage of the base template, since the blender-cloud extension makes use of it, while notifications.pug does not need it yet.
/join should only be used when someone can actually buy a new subscription.
/renew should be used when someone already has a subscription that needs
to be renewed.
Since url_for('cloud.xxxx') makes no sense in Pillar, I just hard-coded
/renew instead.
Added this button in the /u/ user/embed view, so that admins can easily force a re-check from Blender ID without requiring the user themselves to perform any actions.
This is done by moving users/edit_embed.pug to users/edit_embed_base.pug,
and having a new users/edit_embed.pug extend that. Projects like Blender
Cloud can then provide their own users/edit_embed.pug and override certain
blocks.