270bb21646
Support IP range editing in Organization view_embed
2018-01-25 14:01:28 +01:00
d3f97358d9
Work around Eve not supporting returning binary data
2018-01-25 14:01:28 +01:00
c44f0489bc
Backend support for organization IP ranges.
...
We can now store IP ranges with Organizations. The aim is to have any user
logging in with a remote IP address within such a race will get the
organization roles assigned to the user object stored in the Flask session.
This commit just contains the MongoDB storage and querying, and not yet the
updates to the user.
2018-01-25 14:01:28 +01:00
9bd41ed5d7
Added urljoin Jinja2 filter
...
Use as {{ config['THESERVER'] | urljoin('path/on/server') }}. It uses
the urllib.parse.urljoin() function to do this.
2018-01-25 14:01:28 +01:00
0eca0c706f
Introducing overridable comments list rendering
...
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,
2018-01-20 00:43:54 +01:00
4da7a84c86
Fix for broken urls in blog list
...
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.
2018-01-18 16:02:29 +01:00
2b2910a1ac
Fix typo in comment
2018-01-18 15:59:45 +01:00
bdff391440
Support for rendering of video file attachments
2018-01-17 15:55:25 +01:00
46beaece75
Implemented pillar.flask_extra.ensure_schema(url)
...
This function ensures that the URL has the correct schema, given the
app configuration. This is required because the Flask instance can sit
behind an SSL-terminating proxy like HAProxy and not know that it is
reachable via HTTPS.
2018-01-12 17:21:38 +01:00
15ce143356
Include Last-Modifed HTTP header in Blog feed response
2018-01-12 16:49:43 +01:00
7245dac1ca
Elastic: reverted previous two commits
...
The ngrams cause too much noise in the search results.
2018-01-12 16:27:09 +01:00
6748fd0006
Elastic: use ngrams for user search but not assets
2018-01-12 15:36:15 +01:00
b2bd01117e
Elastic: tweaked user indexing
...
This makes it a bit more "fuzzy", so users are also matched on N-grams
and not just N-grams-from-the-start-of-the-word.
2018-01-12 15:28:33 +01:00
31ca4f3d23
Gracefully handle Elastic errors in user search
2018-01-12 15:27:56 +01:00
8326d8e7fe
Elastic query: remove matching on document type.
...
ElasticSearch 6 removes support for different document types in one index,
so we don't have to match for it any more. Furthermore, elasticsearch_dsl
seems to save with the generic 'doc' type, so this check is
counter-productive.
2018-01-12 11:17:52 +01:00
3e5ccaf8fd
Elastic indexing: explicitly save into the configured index.
2018-01-12 11:16:42 +01:00
68b6e43649
Upgraded ElasticSearch to 6.1.x.
2018-01-11 10:29:15 +01:00
61673ef273
Search: implemented pagination
...
- Got rid of the nasty off-by-one logic in the JavaScript.
- Implemented pagination at the API.
2018-01-10 17:07:21 +01:00
82a2e9a523
Search: Disable Algolia backend
2018-01-10 15:53:56 +01:00
36da289746
user search: boost exact matches on username
2018-01-10 15:12:39 +01:00
7f892601f4
Reformatting
2018-01-10 15:12:22 +01:00
1d08f6850b
Elastic: paralellise reindexing
...
It's marginally faster (on our production DB user reindexing goes down from
5+ minutes to 4 minutes), but will likely become significantly faster when
we run ElasticSearch on its own machine.
2018-01-09 17:05:31 +01:00
408db5e060
Elastic: log how long reindexing took
2018-01-09 16:57:31 +01:00
740e088cc5
Elastic: Doc & return type polish
2018-01-09 16:21:08 +01:00
4fdcd2a343
Elastic: include exact searches on email address
2018-01-09 16:16:38 +01:00
6e40b9a44a
Elastic: delegated common user search functionality to a single function
2018-01-09 16:16:26 +01:00
c20aa41b5c
Formatting
2018-01-09 16:09:49 +01:00
d96be99d1d
Hacked jquery.autocomplete to not use algolia-autocomplete CSS class
...
Instead, it now uses search-autocomplete.
2018-01-05 17:53:24 +01:00
284d822a8a
Asset search: order by newest-first on empty query
2018-01-05 17:29:59 +01:00
9d39995d0f
Asset search: debug-log instead of print query + result
2018-01-05 17:29:47 +01:00
83a38ff50e
Admin user search: include aggregations
2018-01-05 17:03:09 +01:00
33c051bf28
Search: include explicit indices to search
...
This makes it possible to search for 'everything' without explicitly
stating the document type.
2018-01-05 16:42:08 +01:00
b6f7958dfe
Admin user search: Include aggregations
2018-01-05 16:41:36 +01:00
acd7a40fe6
Renamed do_search → do_node_search
2018-01-05 16:40:54 +01:00
af69b4fa58
Admin user search: boost user ID matching
2018-01-05 16:02:49 +01:00
01d8ad5ca2
Admin user search: also match on user ID
...
And removed user ID matching for regular user search.
2018-01-05 15:52:25 +01:00
57ce554feb
Log search queries instead of printing them
2018-01-05 15:52:01 +01:00
75a6de18b2
Regular user search now also finds by email address
2018-01-05 15:51:30 +01:00
fdab66a500
Elastic: prevent indexing deleted nodes
2018-01-05 15:33:40 +01:00
dcd67b6114
Simplified ElasticSearch connection
2018-01-05 15:24:57 +01:00
f6cf8d29f0
Elastic: search indexing logging tweaks
2018-01-05 15:24:47 +01:00
8f6966978f
Elastic: more progress logging when reindexing users
2018-01-05 14:42:10 +01:00
7f33826d1d
prepare_user_data: Always return a dict
2018-01-05 14:41:59 +01:00
b09e4463bd
Elastic: don't regenerate picture links
...
Thumbnail links shouldn't expire anyway.
2018-01-05 14:27:46 +01:00
1bfda7769a
Elastic reindexing: more verbose logging at info level.
...
Including some progress report every 100 nodes.
2018-01-05 14:22:38 +01:00
bbdb731043
Slightly nicer return value & dict creation.
2018-01-05 14:22:38 +01:00
4381ed6671
Elastic: handle pictures without variations or project ID
...
This happens on old file documents.
2018-01-05 14:22:38 +01:00
2ca960a73f
Hard-code 'elastic:9200' as ElasticSearch host
2018-01-05 13:10:39 +00:00
2433a1b981
minor documentation / annotation fixes
2018-01-05 11:58:33 +01:00
2ed2aaf58f
merge
2018-01-05 10:58:32 +01:00