Commit Graph

2409 Commits

Author SHA1 Message Date
Anna Sirota 00e7914da0 Pin a different version of wheel 2021-03-18 17:15:02 +01:00
Anna Sirota fb151734ef Pin setuptools and wheels as well 2021-03-18 16:57:44 +01:00
Anna Sirota 1ec08638ce Pin cryprography 2021-03-18 11:46:05 +01:00
Pablo Vazquez b4982c4128 Pillar: Wider scrollbars 2020-07-29 22:53:01 +02:00
Francesco Siddi 970303577a Update gulp-sass 2020-07-23 18:49:12 +02:00
Pablo Vazquez 5d9bae1f0f Blender Cloud: Fix responsive issues on navigation. 2020-07-22 18:32:48 +02:00
Pablo Vazquez 2e41b7a4dd Blender Cloud: Fix responsive issues on timeline. 2020-07-22 18:32:35 +02:00
Pablo Vazquez b4207cce47 Blender Cloud: Fix responsive issues on blog. 2020-07-22 18:32:22 +02:00
Francesco Siddi 5ab4086cbe Notifications: Regulate fetching via cookie
We introduce a doNotQueryNotifications cookie with a short lifetime,
which is used to determine wether getNotifications should be called
or not. This prevents notifications from being fetched at every page
load, unless the cookie is expired.
2020-04-17 13:32:27 +02:00
Francesco Siddi 86206d42dc Notifications: Set timeout from 30 to 60 seconds
This slightly reduces server load, as clients that keep a page open
will query less often.
2020-04-17 13:32:27 +02:00
Ankit 7c238571bf Fix T73490 Hyperlink bug
Fix typo in the link to Blender Cloud

Maniphest Tasks: T73490

Differential Revision: https://developer.blender.org/D7218
2020-03-27 09:52:51 +01:00
Sybren A. Stüvel 7dc0cadc46 Fix issue with Cerberus
Cerberus has a clause `… and X in self.persisted_document`, which fails
when `persisted_document` is `None` (which is the default value for the
parameter). This code can be found in the function `_normalize_default()`
in `.venv/lib/python3.6/site-packages/cerberus/validator.py:922`.
2020-03-19 16:57:50 +01:00
Sybren A. Stüvel 47474ac936 Replaced Gravatar with self-hosted avatars
Avatars are now obtained from Blender ID. They are downloaded from
Blender ID and stored in the users' home project storage.

Avatars can be synced via Celery and triggered from a webhook.

The avatar can be obtained from the current user object in Python, or
via pillar.api.users.avatar.url(user_dict).

Avatars can be shown in the web frontend by:

- an explicit image (like before but with a non-Gravatar URL)
- a Vue.js component `user-avatar`
- a Vue.js component `current-user-avatar`

The latter is the most efficient for the current user, as it uses user
info that's already injected into the webpage (so requires no extra
queries).
2019-05-31 16:49:24 +02:00
Sybren A. Stüvel 8a19efe7a7 Reformatted code and added import to resolve PyCharm warnings 2019-05-31 13:55:06 +02:00
Sybren A. Stüvel 3904c188ac Removed trailing spaces 2019-05-31 13:55:06 +02:00
Sybren A. Stüvel 26e20ca571 Fix for now-allowed PATCH on users
Commit 0f0a4be4 introduced using PATCH on users to set the username.
An old unit test failed, as it checks that PATCH is not allowed (e.g.
tests for 405 Method Not Allowed response).
2019-05-31 10:24:11 +02:00
Sybren A. Stüvel e57ec4bede Moved user_to_dict() function out of pillar.web.jinja module 2019-05-31 10:23:25 +02:00
Sybren A. Stüvel 3705b60f25 Fixed unit test by doing late import
For some reason the old pillar.auth stuck around, failing the
`isinstance(some_object, auth.UserClass)` check because it compared to the
old class and not the reloaded one.
2019-05-31 10:22:46 +02:00
Sybren A. Stüvel 0f0a4be412 Fixed updating username in settings view
The timestamps used by the 'last viewed' property of the video progress
feature were converted to strings when sending to the frontend, but never
changed back to timestamps when PUTting via the SDK. I solved it by not
PUTing the user at all, but using PATCH to set the username instead.
2019-05-29 18:37:01 +02:00
Sybren A. Stüvel 23f8c1a446 Ran npm audit fix --force
This fixed 64 security vulnerabilities and hopefully didn't break too much.
2019-05-29 17:06:41 +02:00
Sybren A. Stüvel 1f5f781ecf Suppress warnings from Werkzeug
- Werkzeug deprecated Request.is_xhr, but it works fine with jQuery and we
  don't need a reminder every time a unit test is run. When we upgrade to
  Werkzeug 1.0 (once that's released) we'll see things break and fix them.
- Werkzeug deprecated their Atom feed. This we should act on; tracked in
  https://developer.blender.org/T65274.
2019-05-29 15:22:45 +02:00
Sybren A. Stüvel 4425771117 Suppress Cerberus deprecation warning caused by Eve
Eve is falling behind on Cerberus. See my bug report on
https://github.com/pyeve/eve/issues/1278 for more info.
2019-05-29 14:32:46 +02:00
Sybren A. Stüvel 931c29a21f MongoDB: db.collection_names() is deprecated → db.list_collection_names() 2019-05-29 13:46:53 +02:00
Sybren A. Stüvel 2aa79d3f09 MongoDB: more changing count() → count_documents() 2019-05-29 13:46:53 +02:00
Sybren A. Stüvel 6f8fd4cd72 Cerberus 1.3 renamed 'validator' → 'check_with'
This results in a change in schemas as well as in validator function names.
2019-05-29 12:58:40 +02:00
Sybren A. Stüvel f53217cabf Added some type declarations 2019-05-29 12:58:40 +02:00
Sybren A. Stüvel 8b42e88817 Cerberus 1.3 renamed '{value,key}schema' to '{values,keys}rules'
'valueschema' and 'keyschema' have been replaced by 'valuesrules' and
'keysrules'. Note the change from 2x singular ('value' and 'schema') to
2x plural ('values' and 'rules').
2019-05-29 12:57:38 +02:00
Sybren A. Stüvel dd5cd5b61a Compatibility with Eve 0.9.1
Note that Eve's update from 0.9 → 0.9.1 had a breaking API change, as the
return type of `app.data.find(...)` changed...
2019-05-29 10:50:55 +02:00
Sybren A. Stüvel 459a579964 Some extra type annotations 2019-05-28 16:13:14 +02:00
Sybren A. Stüvel 0b32e973a9 More thorough retrying in Blender ID communication 2019-05-28 16:13:14 +02:00
Sybren A. Stüvel c6e70dc5d9 Removed and gitignored poetry.lock
The poetry.lock files are only relevant for repeatable deployments,
and the one in this project isn't used for that (only the Blender
Cloud project file is used, and that's still there).
2019-05-28 16:13:14 +02:00
Sybren A. Stüvel 1b90dd16ae Re-locked dependencies 2019-05-28 16:13:14 +02:00
Sybren A. Stüvel 1e823a9dbe MongoCollection.count() and update() are deprecated
Eve doesn't have any counting methods on `current_app.data`, so there is
no one-to-one translation for `cursor.count()` in
`file_storage/__init__.py`. Since the call was only used in a debug log
entry, I just removed it altogether.

I removed `pillar.cli.operations.index_users_rebuild()`, as it was
importing `pillar.api.utils.algolia.algolia_index_user_save` which doesn't
exist any more, so the code was dead anyway.
2019-05-28 16:13:14 +02:00
Sybren A. Stüvel 47d5c6cbad UnitTest.assertEquals is deprecated, replaced by assertEqual 2019-05-28 16:13:14 +02:00
Sybren A. Stüvel b66247881b Relaxed required versions of all our dependencies
Some packages were upgraded; the rename from `CommonMark` to `commonmark`
was the only change breaking the unit tests.
2019-05-28 16:13:14 +02:00
Sybren A. Stüvel 90e5868b31 Dependencies: remove requests, it's pulled in via python-pillar-sdk anyway 2019-05-28 16:13:14 +02:00
Sybren A. Stüvel 94efa948ac Development dependencies updates to their latest versions 2019-05-28 16:13:14 +02:00
Sybren A. Stüvel ec344ba894 Generate Blender ID URL based on configuration 2019-05-23 13:48:24 +02:00
Sybren A. Stüvel cb8c9f1225 Merge branch 'production' 2019-05-22 10:27:25 +02:00
Sybren A. Stüvel 51ed7a647d put_project(project_dict): also log the error when we cannot PUT
Previously only a ValueError was raised, which was sometimes swallowed.
Instead of looking up the culprit and solving this properly, I just log the
error now.
2019-05-22 10:15:25 +02:00
Sybren A. Stüvel c396c7d371 Allow web projects to un-attach project pictures
This makes it possible to PUT a project after attach_project_pictures()
has been called on it (which embeds the picture file documents).

This will be used in SVNman.
2019-05-22 10:14:19 +02:00
Sybren A. Stüvel 2d7425b591 Added 'idna' package as dependency
It's required by pyopenssl but for some reason wasn't installed by Poetry.
2019-05-14 11:19:03 +02:00
Sybren A. Stüvel 3f875ad722 Gitignore devdeps metadata directory 2019-05-14 10:42:15 +02:00
Sybren A. Stüvel 9c517b67c5 Documenting use of Poetry for dependency management 2019-05-14 10:42:15 +02:00
Sybren A. Stüvel dd9a96d111 README: Removed trailing whitespace 2019-05-14 10:42:15 +02:00
Sybren A. Stüvel 3d6ff9a7bc Moving to Poetry 2019-05-14 10:42:15 +02:00
Pablo Vazquez 8ba7122a01 Forms: Use own label element for fields instead of wtforms.
This way we can do two things:
* Tag the field for translation
* Use a filter (like undertitle for nicer labels)
2019-04-24 21:29:55 +02:00
Francesco Siddi 15d5ac687c Attach all project pictures when viewing node
The Open Graph rendering code is not completely refactored yet,
so it still requires a mix of project.picture_header and
project.picture_16_9. By attaching all project pictures we prevent
unexpected errors.
2019-04-19 15:30:55 +02:00
Francesco Siddi 402f9f23b5 Use picture_16_9 as og_image
Previously we used picture_header, which did not guarantee a suitable
aspect ratio for an Open Graph image.
2019-04-19 14:12:43 +02:00
Francesco Siddi 486fb20dcf Enhance project with attach_project_pictures
Instead of individually attaching project images, use the utility
function.
2019-04-19 14:11:42 +02:00