Commit Graph

10 Commits (1b3adc396f9b5a96db5da423fefd77b764f7c755)

Author SHA1 Message Date
mpeltriaux 8f40162974 #31 API Tests
* writes test for sharing using the API
* fixes bug on frontend form where an exception occured on generating a new API token if no token existed, yet
* adds permission constraint (default group) for using the api in general
* fixes default-group-only behaviour for sharing-API, so users can only add new users and not removing them, as long as they do not have any other group membership like registration or conservation office
* changes 'ksptoken' to 'Ksptoken' to match CGI standard for http header keys
3 years ago
mpeltriaux b13e67e061 #31 API Frontend token generating
* adds frontend settings for users to create API tokens on their user settings
3 years ago
mpeltriaux 25cccee5d6 #31 API Share
* adds support for GET and PUT of sharing users for all data types (compensation is shared via intervention)
3 years ago
mpeltriaux 26f402fd3b #31 API WIP
* adds support for GET /check on intervention to run checks automatically via API
3 years ago
mpeltriaux d0f3fb9f61 #31 API POST Intervention
* adds support for proper POST of intervention
* makes /<id> optional (required for Post)
3 years ago
mpeltriaux 45ac5b68b9 #31 API basic implementation Refactor
* reorganizes code into proper api/utils/serializer subclasses to keep serialization logic away from regular view logic
3 years ago
mpeltriaux 8d400b4ffe #31 API basic implementation Cleanup
* cleans code
* reworks many code fragments into smaller methods and split into super class
3 years ago
mpeltriaux 897520f906 #31 API basic implementation Compensation
* adds compensation fetching for API v1
* refactors filter into predefined lookup dict of super class (needs to be customized on subclasses)
3 years ago
mpeltriaux 3938db1893 #31 API basic implementation Token Authentication
* adds token checking to AbstractModelAPIView
* adds user accessibility filtering for intervention API v1
* extends fetch_and_serialize() method to take a dict for db filtering instead of a single field and value
* organizes urlnames into supporting formats like "api:v1:intervention"
3 years ago
mpeltriaux 881da38538 #31 API basic implementation
* adds new app to project
* adds relation between User model and new APIUserToken model
* adds first implementation for GET of intervention
* adds basic code layout for future extension by having new versions
3 years ago