Commit Graph

75 Commits

Author SHA1 Message Date
4ff52a8af0 Add post status to posts query for homepage 2018-09-20 19:03:57 +02:00
7ba8ff7580 New templates for /learn and /libraries 2018-09-20 15:00:10 +02:00
690b35bab1 Add more tags to NODE_TAGS 2018-09-19 16:15:31 +02:00
356e4705b3 Add digital-painting to NODE_TAGS 2018-09-19 15:53:56 +02:00
678a03dbf1 Update NODE_TAGS 2018-09-19 11:34:22 +02:00
265794d4b7 Pass title to /production 2018-09-19 11:20:32 +02:00
94c2c6e550 Start of "production videos", a.k.a. tagged assets overview
Tagged assets are shown in a list per tag. The list is dynamically
loaded with JavaScript.
2018-09-06 16:08:23 +02:00
0b8ebecfea Don't import flask_login.request
`flask_login.request` is the exact same thing as `flask.request`, so
importing it from `flask_login` makes no sense. Also, it's been removed
from the new Flask-Login.
2018-08-29 12:19:40 +02:00
4769e2e904 New landing page for Hero project 2018-04-16 14:38:08 +02:00
8c48a61114 Switched attachment rendering to shortcode system
Requires Pillar 3b452d14ce32e1a744fc526a922e1bb60b83ef25 or newer.
2018-04-03 11:02:33 +02:00
7ba1c55609 Biling page: moved user classification logic from template → view code
This is the kind of stuff that's much easier expressed in Python than in
the template code.

API calls removed:
  - fetching the user isn't necessary, since we have
    pillar.auth.current_user anyway.
  - a call for each group the user is member of, since we only used it to
    check whether the user has demo access anyway.
2018-01-25 14:06:13 +01:00
0908a13519 Avoid error when Store cannot be reached. 2018-01-25 14:06:13 +01:00
06414ab0ed Override for comments_for_node
Make use of the render_comments_for_node function, and define custom logic to determine the value of can_post_comments.
2018-01-20 00:45:57 +01:00
4c2632669b PEP8 formatting 2017-12-21 15:26:32 +01:00
c2518e9ae1 Send welcome email to new Cloud subscribers 2017-12-21 15:26:23 +01:00
0b34c5c1c6 Also create user when member of organisation 2017-12-20 14:22:26 +01:00
fd68f3fc8b Allow user creation from Blender ID webhook "user modified"
When the webhook indicates that the user has a Cloud subscription (demo,
active, or renewable), the user is immediately created.
2017-12-20 12:56:48 +01:00
a2c24375e5 Webhooks: smarter way to find the user the webhook applies to.
We now also match on Blender ID (through the 'auth' section of the user
document), so that even when we have missed an email change we can still
apply the changes from the webhook.
2017-12-20 12:22:51 +01:00
be4b36a661 Also accept user-modified webhook when old email address is unknown.
When the old email address is unknown, and the new one does map to a user,
use the webhook to update the new user.
2017-12-20 11:40:56 +01:00
ae700b5eef Added payload description of Blender ID webhook 2017-12-20 11:19:15 +01:00
9c2e6f9081 Fixed forced login for user switching 2017-12-12 11:25:48 +01:00
abb0ded3f2 Lowered log level for webhook call for unknown user 2017-12-08 14:08:04 +01:00
f948969b20 Fixed webhook so that users' full_name isn't reset to the empty string. 2017-12-08 14:04:11 +01:00
c031c1e8ae Removed flamenco-user and attract-user role linking to subscriber/demo/admin
It was a hack due to the lack of a capabilities system.
2017-12-07 17:09:06 +01:00
bff51e1e83 Added /renew endpoint to redirect to Blender Store renewal URL. 2017-12-06 14:36:02 +01:00
561db0428d Using new blender_id.get_user_blenderid() function 2017-12-05 11:56:33 +01:00
f7ce8d74a7 Implemented Blender ID webhook for user change notifications
Handles changes in:

 - roles
 - full name
 - email address
2017-12-01 19:06:16 +01:00
532bf60041 Obtain subscription info from Store.
This was in Pillar, and is now moved to Blender Cloud. It's used to obtain
the subscription expiration date from Blender Store.
2017-11-30 15:45:40 +01:00
d5d189de8c Reworked subscription reconciliation to use Blender ID instead of Store 2017-11-30 15:30:41 +01:00
5d281dc6ce Introduce 'has_subscription' role with 'can-renew-subscription' capability
This is in preparation of presenting different messages to users, when their
subscription should be renewed, or when they should buy a (new)
subscription.
2017-11-30 15:30:08 +01:00
f4e277f1d1 Homepage: Render attachments on posts 2017-11-23 16:16:10 +01:00
4207d051a9 Added subscriber-pro role.
This is used in svnman to bind to the svn-use capability.
2017-11-14 16:09:29 +01:00
0c4db84940 Fix link to comments 2017-11-09 19:38:56 +01:00
8288b4eab1 New Homepage: Featuring more in the blog posts 2017-11-09 18:37:32 +01:00
c2492e8710 When logging in from /welcome, redirect to index
Backend logic simplified, to support the next arg if provided, otherwise simply redirect to the request.referrer (last visited page).
2017-11-07 18:25:42 +01:00
13ed89c480 Add terms and conditions and privacy statement 2017-09-21 22:17:52 +02:00
5d0b8a1dc4 Added static page that embeds stats from Kibana.
It just has a full-width iframe that embeds the dashboard from
https://stats.cloud.blender.org/
2017-09-21 14:25:14 +02:00
41d47cdeb8 PEP8 formatting 2017-09-19 13:45:48 +02:00
19ccffa4ae Cache the homepage template context.
This requires pillar-python-sdk c8eec9fa9d8a198df198538a38ca1ad2367bb3e6
or newer.
2017-09-19 13:45:10 +02:00
aaf95f96a7 Fixed user switching.
Basically this copies bd976e6c2e7867fee70c8654cc887bf1d3973bc1 from Pillar.
2017-09-19 13:39:41 +02:00
f3e0484328 Revert "Cache the entire homepage for 5 minutes."
This reverts commit 9a692d475b.
2017-09-18 13:05:29 +02:00
869e228069 Homepage Random Featured: Show project more prominently for first item 2017-09-17 20:12:47 +02:00
9a692d475b Cache the entire homepage for 5 minutes.
This means that comments and blog posts will take at most 5 minutes to show
up on /.
2017-09-15 17:46:20 +02:00
0b61e517d2 Added missing attached_to.url assignment 2017-09-15 17:03:31 +02:00
0c251c0470 Added missing projection 2017-09-15 15:46:52 +02:00
e103a712b3 Performance improvements for the homepage (activity, blog, random featured) 2017-09-15 15:25:27 +02:00
f4ac9635a9 Fixed two mistakes in stats query count_nodes()
- 'p.x' → 'project.x'
- is_private: {$ne: true} → is_private: False, because true is the default.
2017-09-12 11:29:36 +02:00
d80fc48635 Redirect properly after login
- Use next=xxx URL parameter
- Redirect to / when no next=xxx was given and the referrer is /welcome
2017-09-01 17:04:41 +02:00
a9280dd05f Introducing settings for blender-cloud
Moved Blender Cloud specific settings from Pillar into this application.
2017-08-30 23:13:06 +02:00
1fb3c88a8f Override /login endpoint
For Blender Cloud we want to point directly to blender-id OAuth.
2017-08-25 11:56:43 +02:00