Commit graph

32 commits

Author SHA1 Message Date
Pēteris Caune
4d0cf7fb80
Remove @nolog decorator
The purpose of @nolog was to disable logging in certain
test cases to avoid console spam during tests. But with the
current logging configuration console is clean even without it.
2024-02-06 17:30:24 +02:00
Pēteris Caune
8b006e0d58
Move nolog decorator to hc.test so it can be reused 2023-10-25 13:48:55 +03:00
Pēteris Caune
ab3dad4ecc
Fix type annotations in tests to use _MonkeyPatchedWSGIResponse 2023-08-29 22:35:51 +03:00
Pēteris Caune
aaa172cd28
Improve type hints 2023-08-29 17:52:20 +03:00
Pēteris Caune
161430fb10
Sort imports and add "from __future__ import annotations" 2022-10-17 16:52:15 +03:00
Pēteris Caune
f8131741ef
Fix minor API inconsistencies
1. Drop API support for GET, DELETE requests with a request body.
Healthchecks had an undocumented quirk where you could authenticate a
GET or DELETE request by putting a '{"api_key":"..."}' in request body.
This commit removes this feature.

Note: POST requests can still authenticate either by sending
a X-Api-Key header, or by putting a "api_key" key in request body.
GET and DELETE requests can now only authenticate with the
request header.

2. Add missing @csrf_exempt annotations in API views
When client sends a HTTP POST request to a GET-only endpoint,
the server is supposed to respond with "405 Method Not Allowed".
Due to CSRF checking, a couple endpoints were responding with
"403 Forbidden" instead. Adding @csrf_exempt annotations fixes
the problem.
2021-09-10 22:49:12 +03:00
Pēteris Caune
688aa5b3c3
Implement hc.api.views.ping_by_slug 2021-09-09 11:43:25 +03:00
swoga
9640d2242f feat: add manager role 2021-07-26 12:26:06 +03:00
Pēteris Caune
ed6b15bfa9
Update the "Set Password" function to use confirmation codes 2020-11-16 14:53:50 +02:00
Pēteris Caune
155a1f132b
Simplify super() calls in tests 2020-11-16 11:20:01 +02:00
Pēteris Caune
0a85c5ed12
In Account Settings > My Projects, indicate read-only memberships as read-only 2020-08-31 11:07:39 +03:00
Pēteris Caune
f7acaa57af
Adding tests. 2020-04-12 18:21:08 +03:00
Pēteris Caune
0c9c453ea0
Profile.current_project not used any more, remove last remaining references. cc: #336 2020-02-27 12:34:21 +02:00
Pēteris Caune
bb808852d9
Reduce usage of request.project cc: #336 2020-02-25 15:39:54 +02:00
Pēteris Caune
59f5b7a5f5
Project code in URL for the "Add Webhook" page. cc: #336 2020-02-21 14:29:05 +02:00
Pēteris Caune
cdfc9840a7
Source formatted with Black 2019-05-15 14:27:50 +03:00
Pēteris Caune
069bc9b735
Test cases for adding project, removing project and leaving project. 2019-01-29 19:57:18 +02:00
Pēteris Caune
8dd91b247b
When user has no projects, don't auto-create a project. 2019-01-29 13:19:15 +02:00
Pēteris Caune
d52d292889
Remove Member.team_id (use Member.project_id instead) 2019-01-22 10:36:41 +02:00
Pēteris Caune
664aad916a
Remove Profile.team_name (use Project.name instead) and Profile.current_team (use Profile.current_project instead) 2019-01-19 17:56:16 +02:00
Pēteris Caune
c08f02ab7f
Drop Profile.api_key and Profile.api_key_readonly (both are stored with Project now) 2019-01-17 16:26:45 +02:00
Pēteris Caune
b5df5b3c6e
Project.badge_key must be not null and unique. 2019-01-12 22:08:43 +02:00
Pēteris Caune
6b7f212c8a
Use the api keys from project, not user profile 2019-01-12 21:34:45 +02:00
Pēteris Caune
1c69cf7f89
Project model. cc: #183 2019-01-12 16:40:21 +02:00
Pēteris Caune
182f9e1109
Refactor API key checking code 2018-10-29 18:34:58 +02:00
Pēteris Caune
0723476a0c All plans now have team access, but different team size limits. 2017-09-02 15:45:20 +03:00
Pēteris Caune
5f2da08d7e Per-profile, per-month counters of sent SMS messages. 2017-07-15 01:04:05 +03:00
Pēteris Caune
207b0f9048 Adding on_delete keywords, more to come. 2017-05-28 13:38:38 +03:00
Pēteris Caune
813c316888 Access rights checks for team access stuff in profile page. 2016-05-14 12:51:10 +03:00
Pēteris Caune
feb2294a7e Tests for team access. 2016-05-09 17:29:41 +03:00
Pēteris Caune
fdf9c607e5 Team Access, test cleanup 2016-05-09 15:35:13 +03:00
Di Wu
fe72792fd2 use basetestcase for most test cases that require predefined user, add test for ensuretriggers, add travis cache 2016-01-18 01:02:42 -08:00