Upon IOError or OSError (which includes SMTP protocol errors) the mail
sending task is retried after MAIL_RETRY seconds. It is retried three
times (default setting of Celery) only.
abs_url(x) is a shortcut for url_for(x, _external=True,
_schema=app.config['SCHEMA']), and should be used for all URLs that should
include the hostname and schema.
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.
When getting an _external=True URL, we shouldn't use the scheme of the
current request at all (this depends on HaProxy forwarding the correct
headers, which might fail when misconfigured) and just always use the
preferred URL scheme. This fixes it at least for the user switching,
because Blender ID will refuse to redirect back to a http:// URL.
Both 'video-encoder' and 'admin' roles get 'encode-video' capability,
which allows users to upload video that gets encoded & displayed as a
video. For users without this capability videos are handled as regular
downloads.
Note that pillar/bugsnag_extra.py still exists; I'm keeping it around for
a while until we know what info we miss in Sentry, can port it, and then
remove/refactor it.
/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.
Instead of performing a call to the Blender Store, call to Blender ID to
get the user's subscription status.
Currently this is performed as a second HTTP call after logging in; in the
future we may want to include the roles in the login response from Blender
ID, so that we can do this in one call instead of two.
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.
This gets rid of the use of javascript for converting node/post description.
Now we only use markdown.js for real time as-we-type stuff, like node/post
editing or commenting.
Before this, authentication tokens were kept in the database, even when
someone logged out. This is unwanted behaviour, as logging in will create
yet another token anyway there is no reason to keep the token around.