1637 Commits

Author SHA1 Message Date
dfc224d8a9 Added capability 'encode-video' and role 'video-encoder'.
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.
2017-12-07 16:51:16 +01:00
5c7f37a100 Lowered dependency versions to satisfy Eve 2017-12-07 13:02:23 +01:00
fc25ca9c03 Replaced Bugsnag with Sentry - requires config changes!
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.
2017-12-07 12:58:21 +01:00
6c4dd8ae02 Fix T53339: Downgraded Werkzeug 0.12.2 → 0.11.15 2017-12-07 12:44:05 +01:00
9fdcfff4fc Direct users to renewal page on Store instead of /join
/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.
2017-12-06 14:39:30 +01:00
2bcc26860f Removed 'subscriber' cap from 'admin' role
This allows admins to test what happens when users do not have a
subscription. To give the user subscriber capability, just grant demo role
as well.
2017-12-06 12:09:21 +01:00
1e012f860b Registered org-subscriber role so that it shows in the admin 2017-12-06 11:58:21 +01:00
87fe1887e8 Added "Update from Blender ID" button
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.
2017-12-05 11:45:42 +01:00
c8221ea0e4 Simplified javascript in users/edit_embed_base.pug
There is no need to use JQuery, a unique ID for the a-element, and an
invalid href value, just to bind on-click functionality to a link.
2017-12-05 11:44:05 +01:00
517b283893 Accept roles from Blender ID in two formats
This supports {'role_name': bool} dicts (the old format) and any iterable
of strings {'role_name', ...}
2017-12-01 18:10:33 +01:00
0b218eb656 Use Blender ID to obtain subscription status.
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.
2017-11-30 15:28:35 +01:00
8ba4cc5c0c Allow extension of users/edit_embed.pug
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.
2017-11-29 13:58:47 +01:00
2ad65b0485 Project: Remove collapse of sidebar
Since projects went full-width it's not needed anymore.
2017-11-28 15:36:31 +01:00
ce7754ffe4 Renaming IDs to classes 2017-11-24 19:34:58 +01:00
7252055e4a Markdown: Convert Markdown via Jinja filter in the template
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.
2017-11-23 16:49:19 +01:00
c086cff36e Comments: Only load JS for post/edit comments if we can actually comment 2017-11-23 16:40:58 +01:00
eeba87d333 Blog: Unify the looks of blog posts
Now that the render_blog_post macro is shared with the homepage
2017-11-23 16:20:29 +01:00
cb7a23bc69 Fixed home project menu 2017-11-21 14:48:59 +01:00
49a6a6a758 Delete the auth token when logging out.
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.
2017-11-17 12:10:21 +01:00
491c5e1b8c A bit more margin around iframe on node descriptions 2017-11-10 17:57:52 +01:00
3466320d98 File Upload: Don't clear all upload toastr notifications
Define the toastr on setup and clear only that one once it's finished
2017-11-10 17:57:17 +01:00
0cea8d622d Update cache for CSS/JS 2017-11-09 19:00:01 +01:00
a2df79d614 Minimum height for youtube embeds 2017-11-09 18:38:21 +01:00
15d2f1ce18 Added links to Blender Store and ID on /u/ user page. 2017-11-09 16:56:34 +01:00
fee242ad07 Allow a custom error view with @require_login() 2017-11-09 11:09:24 +01:00
cde86db44e @require_login(): made all arguments keyword-only
This allows us to remove the require_roles kwarg at some point, ensuring
that it doesn't fall back to assigning to require_cap instead when that
happens. It's also more explicit everywhere, so it's clearer when we check
for roles or caps.
2017-11-09 11:09:22 +01:00
7d5785da62 Handle exception when users are not allowed to update nodes_latest
When editing a node, the user should not be required to have PUT permission on the project the node belongs to. The function project_update_nodes_list should not be called within edit, but should rather be implemented as hook for specific cases only.
2017-11-08 23:56:30 +01:00
ac9aa59924 Comments: When editing, resize the textarea
Minor tweaks:
* Remove the 'editing' class after cancel/save
* Style <code>, <pre>, etc tags
2017-11-08 22:49:56 +01:00
cb0272fe60 Comments: Put comment content inside a span
So when editing we do not override the author's name.
2017-11-08 22:01:45 +01:00
8ef89d0b53 Fix for crash when element with id 'description' was not found 2017-11-08 21:18:49 +01:00
e01f915abf Comments: Unbind event before binding
Prevents flashing of comments when posting
2017-11-08 20:29:45 +01:00
c6a138ff43 Introducing 00_utils.js
Utilities that can be used accross all Pillar apps

This includes general purpose functions,
small jQuery plugins, and so on.

For example: the autoResize jQuery plugin that automatically
resizes a textarea according to its content was used on all
major Pillar apps so far (Attract, Flamenco, Blender Cloud
and Dillo), proven to be really needed everywhere.
2017-11-08 16:59:38 +01:00
22d65f1e9c put_project now also removes None values 2017-11-08 16:19:30 +01:00
4f282c1587 Bit more space + scrolling for users at /u/ 2017-11-08 15:45:41 +01:00
d651791f22 Set remember=True on login_user to persist login sessions
Before this, after closing the browser a user had to login again.
2017-11-07 23:18:46 +01:00
0cf57a633c Move Blender Cloud specific Sass files to blender-cloud repository
Three Sass files have been moved so far:
_welcome
_homepage
_services

The '_stats.sass' file is no longer used since Kibana
2017-11-07 16:53:03 +01:00
5d6e0af605 Comments: Auto-resize textarea field as we type 2017-11-04 01:59:02 +01:00
8187a8a0dd Moved some useful code from Flamenco to Pillar 2017-11-03 17:39:54 +01:00
390d687f61 Added utility to find project ID from URL.
This is mostly useful for the CLI interface, as the majority of our Pillar
code actually needs more project information than just the ID.
2017-11-03 14:33:19 +01:00
33d3ff07db Added missing newline at end of file 2017-11-03 14:32:24 +01:00
d0f10779f9 Added useful 'string' alias to attrs_extra 2017-11-03 14:32:13 +01:00
8427f03df4 Fixed bug loading extension config defaults 2017-11-03 14:31:56 +01:00
d66bfe6166 Upgraded dependencies to fix problem with Flask-Script
- Flask-Script 2.0.5 → 2.0.6

Along with this came:

- Flask      0.12    → 0.12.2
- Werkzeug   0.11.15 → 0.12.2
- MarkupSafe 0.23    → 1.0
2017-11-03 11:39:53 +01:00
04f7869e8e Comments: Display actual date on mouse over (not pretty_date) 2017-11-02 15:38:37 +01:00
545165c97f Sass: Don't specify strong/b, let the browser decide 2017-11-02 12:41:04 +01:00
021c9e03bb Sass select2: Replace hardcoded values for our variables 2017-11-02 00:39:55 +01:00
53aabc8c84 Translations: Mark more strings for translation 2017-10-27 00:54:05 +02:00
3202b3f0b5 Comments: Style blockquote 2017-10-26 02:28:07 +02:00
e41fd36952 Responsive tweaks for blog sidebar on projects 2017-10-25 18:43:19 +02:00
3636db1793 Blog: Style tweak for project blogs 2017-10-25 17:45:46 +02:00