Commit Graph

18 Commits

Author SHA1 Message Date
Joshua Sangmeister b16afaa285 number poll candidates depending on setting 2020-03-17 07:24:40 +01:00
FinnStutzenstein 5aef823807 Major cache rewrite:
- Removed the restricted data cache (it wasn't used since OS 3.0)
- unify functions for restricted and full data: Just one function, which
  accteps an optional user_id: If it is None, full data is returned, and
  with a user id given, the restricted data
- More atomic access to redis, especially for:
- Check for data-existance in redis and do an auto-ensure-cache.
- Speedup through hashing of scripts and redis' script cache.
- Save schema version into the redis cache and rebuild, if the version
  changed

Client changes:
- Simplified the ConstantsService
- Fixed bug, when receiving an autoupdate with all_data=True from the
  Server
2019-08-08 08:35:02 +02:00
Oskar Hahn 206eb9bcba decode only the needed data when calculating the required users 2019-03-29 22:38:12 +01:00
Oskar Hahn eddbd86d3a Run black 2019-01-08 21:51:52 +01:00
Oskar Hahn 9bb77817dd Refactor assess_permission
* Remove access_permission.get_full_data()
* Remove access_permission.gcet_serializer_class()
* get serializer class from model
2018-12-16 09:10: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 b034839ac8 Remove old projector code 2018-10-29 13:10:15 +01:00
Oskar Hahn 92a39a3fc6 support python 3.7
fix new pep8 stype
2018-08-08 21:46:56 +02: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
Norman Jäckel eaebeb8f06 Fixed get_projector_data impementation. Closed #3282. 2017-06-13 22:21:56 +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 7cd70a568c Added docstrings. Small changes. 2016-10-01 01:48:18 +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
Norman Jäckel 132c6e81ec Forwarding JSON instead of Django model instances to autoupdate loop.
- Used raw SQL for createing default projector during inital migration.
- Removed default_password and hidden agenda items from autoupdate data for some users.
- Removed old get_collection_and_id_from_url() function.
2016-03-06 14:24:53 +01:00
Norman Jäckel 4daa61888f Massive refactoring for autoupdate optimization. 2016-03-06 14:22:40 +01:00