Commit Graph

11 Commits

Author SHA1 Message Date
FinnStutzenstein
5baae14156 Skip autoupdates on foreign personal notes 2019-09-02 13:57:12 +02:00
FinnStutzenstein
d4dc13706f Ensures change id across multiple workers 2019-08-19 09:42:51 +02:00
Oskar Hahn
dd4754d045 Disable the future-lock when updating the restircted data cache
Before this commit, there where two different locks when updating the restricted
data cache. A future lock, what is faster but only works in the same thread. The
other lock is in redis, it is not so fast, but also works in many threads.

The future lock was buggy, because on a second call of update_restricted_data
the same future was reused. So on the second run, the future was already done.

I don't see any way to delete. The last client would have to delete it, but there
is no way to find out which client the last one is.
2019-03-04 21:37:00 +01:00
Oskar Hahn
b329115007 use f-string syntax for strings 2019-01-18 17:37:36 +01:00
Oskar Hahn
eddbd86d3a Run black 2019-01-08 21:51:52 +01:00
Oskar Hahn
eead4efe6a Remove CollectionElement
* Use user_id: int instead of Optional[CollectionElment] in utils
* Rewrote autoupdate system without CollectionElement
2018-11-04 01:06:01 +01:00
Oskar Hahn
cd34d30866 Remove utils.collections.Collection class and other cleanups
* Activate restricted_data_cache on inmemory cache
* Use ElementCache in rest-api get requests
* Get requests on the restapi return 404 when the user has no permission
* Added async function for has_perm and in_some_groups
* changed Cachable.get_restricted_data to be an ansync function
* rewrote required_user_system
* changed default implementation of access_permission.check_permission to
  check a given permission or check if anonymous is enabled
2018-11-03 20:48:19 +01:00
Oskar Hahn
c405b4b323 Use Protocol instead of ABC in cache_provicer 2018-10-28 10:37:16 +01:00
Oskar Hahn
9af6bf1606 ensures test on startup 2018-09-23 16:57:49 +02:00
Oskar Hahn
aac9dcabf5 drop python 3.5 2018-08-23 17:51:30 +02:00
Oskar Hahn
10b3bb6497 Update to channels 2
* geis does not work with channels2 and never will be (it has to be python now)
* pytest
* rewrote cache system
* use username instead of pk for admin user in tests
2018-08-22 06:30:11 +02:00