Commit Graph

34 Commits

Author SHA1 Message Date
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
b034839ac8 Remove old projector code 2018-10-29 13:10:15 +01:00
Oskar Hahn
c405b4b323 Use Protocol instead of ABC in cache_provicer 2018-10-28 10:37:16 +01:00
Oskar Hahn
e7d14a8081 Change_id API
* Improve AutoUpdateFormat
* Receive autoupdate requested via websocket
* Support change_id in query string
* Disable autoupdate at default
* Add websocket protocoll to turn on or off autoupdate
2018-10-26 06:30:01 +02:00
Oskar Hahn
5b5d0e395a new autoupdate format 2018-10-19 07:35:59 +02:00
Oskar Hahn
9af6bf1606 ensures test on startup 2018-09-23 16:57:49 +02:00
Oskar Hahn
dc7ca5e2c4 fix empty values in rest 2018-08-24 12:14:02 +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
Oskar Hahn
92a39a3fc6 support python 3.7
fix new pep8 stype
2018-08-08 21:46:56 +02:00
Norman Jäckel
d381ca36dd Added autoupdate bundle middleware. 2018-01-25 23:09:28 +01:00
Oskar Hahn
d7db714562 CollectionElement and Autoupdate cleanups
* change get_restricted_data and get_projector_data to always use a list
* Add typings to all get_restricted_data and get_projector_data methods
* Replace CollectionElementList with a real list
* Fixed arguments of inform_deleted_data
* Moved CollectionElementCache to cache.py and refactored it
* Run tests with cache enabled (using fakeredis)
2017-09-15 12:11:32 +02:00
Oskar Hahn
be94e97889 more typings 2017-09-03 18:34:55 +02:00
Oskar Hahn
87b889fbf2 Rewrite config to have id field 2017-08-24 15:02:42 +02:00
Oskar Hahn
9d1ebac86e Add typing (#3370)
Add typing
2017-08-23 20:51:06 +02:00
Norman Jäckel
eaebeb8f06 Fixed get_projector_data impementation. Closed #3282. 2017-06-13 22:21:56 +02:00
Norman Jäckel
ea50971ae6 Fixes autoupdate bug for a user without user.can_see_name permission. 2017-06-07 20:55:00 +02:00
Emanuel Schütze
2994f7713b Hotfix for issue #3282.
(projector autoupdate problem by deleting projected object)
2017-06-01 14:57:33 +02:00
Norman Jäckel
ebabc291c5 Refactoring of data parsing for startup and autoupdate. 2017-05-03 08:58:29 +02:00
Oskar Hahn
4963bfa7bf Changed restricted data parsing. Cached full data on startup. 2017-05-01 21:52:16 +02:00
Norman Jäckel
4bdb06bd9b Fixed error for internal function get_model_from_collection_string. 2017-04-27 15:16:07 +02:00
Oskar Hahn
74c1cc63dc Open websocket connections immediately
Also made a performance boost to get_model_from_collection_string()
2017-04-27 12:54:16 +02:00
Oskar Hahn
26b7f2879c Let CollectionElement fail early
Fixes #2835
Fixes #2904
2017-02-12 14:15:58 +01:00
Oskar Hahn
44474049c3 Added docstrings 2017-01-24 15:16:29 +01:00
Oskar Hahn
ebf686ef34 Send all data to the client at startup 2017-01-14 20:42:38 +01:00
Oskar Hahn
728576d514 Performance improvements
* Add caching support to users/group
* Add a function has_perm that works with the cache.
* Removed our session backend so other session backends (without the database) can be used
2017-01-13 13:37:18 +01:00
Oskar Hahn
97b21427aa Change the way that missing cache ids are found.
This is probalby faster but in any way it maks debugging a lot easier. To go though
a big list in a for-loop is no fun at all.
2017-01-10 20:50:44 +01:00
Oskar Hahn
e209dd6dfe Support to send many objects through the autoupdate system 2016-10-04 18:10:04 +02:00
Oskar Hahn
962deca506 Send full_data through the channel.
Saves db queries.
2016-10-01 13:57:53 +02:00
Oskar Hahn
97bd526dd7 Fix config cache key 2016-10-01 12:37:43 +02:00
Oskar Hahn
ac9c9f4ec3 More tests, development instructions and small changes. 2016-10-01 01:48:30 +02:00
Norman Jäckel
7cd70a568c Added docstrings. Small changes. 2016-10-01 01:48:18 +02:00
Oskar Hahn
368873e738 Adds a cache system to the CollectionElement and add
a Collection class that can be used to call a collection
used this for the list and receive rest api.
2016-09-30 21:37:52 +02:00
Oskar Hahn
6abb0976c2 Change system for autoupdate on the projector (#2394)
* Second websocket channel for the projector

* Removed use of projector requirements for REST API requests.

Refactored data serializing for projector websocket connection.

* Refactor the way that the projector autoupdate get its data.

* Fixed missing assignment slide title for hidden items.

* Release all items for item list slide and list of speakers slide. Fixed error with motion workflow.

* Created CollectionElement class which helps to handle autoupdate.
2016-09-17 22:26:23 +02:00