aboutsummaryrefslogtreecommitdiffstats
path: root/backend (follow)
Commit message (Collapse)AuthorAgeLines
* Simplify the logic for fetching from member cacheGravatar Chris Lovering2024-07-16-12/+6
|
* Use redis for the discord member cache over mongoGravatar Chris Lovering2024-07-16-25/+13
|
* Add redis to the projectGravatar Chris Lovering2024-07-16-0/+3
|
* Ensure requested condorcet calculations are on vote componentsGravatar Joe Banks2024-07-11-0/+5
|
* Add new endpoint for performing condorcet calculation on form responsesGravatar Joe Banks2024-07-11-0/+99
|
* Return errors in JSON format so they can still be easily parsedGravatar Joe Banks2024-07-11-1/+13
|
* Add new vote question typeGravatar Joe Banks2024-07-11-0/+4
|
* Move unittest filtering to the Form.dict() functionGravatar Chris Lovering2024-07-09-26/+10
|
* Remove erroneous await from non-async set_response_tokenGravatar Joe Banks2024-07-08-1/+1
|
* Apply fixable lint settings with RuffGravatar Joe Banks2024-07-08-396/+380
|
* Add timezone question typeGravatar Joe Banks2024-07-03-2/+2
|
* Add tearDown feature to unittestsGravatar Janine vN2023-08-11-0/+2
|
* Fix ANN401 Linting FailuresGravatar Hassan Abouelela2022-07-20-5/+4
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Bump Motor Version To 3.0.0Gravatar Hassan Abouelela2022-07-20-3/+2
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Check If User Exists Before Sending WebhookGravatar Hassan Abouelela2022-07-10-5/+5
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Handle Improper Output For UnittestsGravatar Hassan Abouelela2022-07-01-37/+84
| | | | | | | | | | The old testing code only checks the first character of the stdout, meaning that if a user succeeds in printing a 1 before the rest of the output, the testing code will consider that a pass and discard the rest. This change checks that the rest of the stdout is empty as expected. Signed-off-by: Hassan Abouelela <[email protected]>
* Fix Broken Error MessageGravatar Hassan Abouelela2022-06-29-1/+1
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Ensure All Tests Are Prefixed By `test_`Gravatar Hassan Abouelela2022-06-25-1/+2
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Make Unittests AsyncGravatar Hassan Abouelela2022-06-24-6/+8
| | | | | | | | The codejam test suite uses async functions, which would be annoying to deal with in our current template. Switching to async makes that available to those who want it, without affecting those who don't. Signed-off-by: Hassan Abouelela <[email protected]>
* Allow Setup For UnittestsGravatar Hassan Abouelela2022-06-24-4/+8
| | | | | | | | | | Adds the setup method as a special method for unittest question types. Additionally, a couple QoL fixes are included. I changed `unit` to `self` to clarify what it actually is, and I changed an `lstrip` to a `removeprefix` to avoid removing unintentional portions of the name (for instance `something` -> `omething`) Signed-off-by: Hassan Abouelela <[email protected]>
* Merge branch 'main' into asgi-middlewareGravatar Hassan Abouelela2022-06-18-19/+36
|\
| * Enable Login Form In ProductionGravatar Hassan Abouelela2022-06-17-16/+29
| | | | | | | | | | | | | | | | Adds a non-discoverable login form in all environments to make it easier to authenticate. Ideally, we'd have an actual login button, but this is an easy solution in the meantime. Signed-off-by: Hassan Abouelela <[email protected]>
| * Fix Error For Unauthorized Form AccessGravatar Hassan Abouelela2022-06-13-2/+6
| | | | | | | | | | | | | | | | | | Fixes an error where accessing a form without having the proper authorization would cause an unexpected state and raise a 500. Closes #175. Signed-off-by: Hassan Abouelela <[email protected]>
| * Fix NoneType Access Error For Form EditorsGravatar Hassan Abouelela2022-06-13-1/+1
| | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]>
* | use Request to generate the stateGravatar Adrian Garcia Badaracco2022-06-17-1/+1
| |
* | Update backend/middleware.pyGravatar Adrian Garcia Badaracco2022-06-17-1/+1
| | | | | | Co-authored-by: Hassan Abouelela <[email protected]>
* | fix lintersGravatar Adrian Garcia Badaracco2022-06-13-5/+3
| |
* | Replace BaseHTTPMiddleware with pure ASGI middlewareGravatar Adrian Garcia Badaracco2022-06-13-11/+19
|/
* Explicitly Use `_id` Over `id`Gravatar Hassan Abouelela2022-03-14-4/+4
| | | Co-authored-by: Kieran Siek <[email protected]>
* Add Default Attribute For Form Access HelperGravatar Hassan Abouelela2022-03-14-1/+1
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Ensure Form Existence Is Always CheckedGravatar Hassan Abouelela2022-02-11-4/+4
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Use HTTPException To Propagate Access FailuresGravatar Hassan Abouelela2022-02-05-40/+26
| | | | | Co-authored-by: Bluenix <[email protected]> Signed-off-by: Hassan Abouelela <[email protected]>
* Switch To List CompGravatar Hassan Abouelela2022-02-05-8/+2
| | | | | Co-authored-by: Bluenix <[email protected]> Signed-off-by: Hassan Abouelela <[email protected]>
* Fix Linting ErrorsGravatar Hassan Abouelela2022-02-05-7/+7
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Add Role Based Editors To FormsGravatar Hassan Abouelela2022-02-05-34/+51
| | | | | | Adds the ability to specify who can edit forms using discord roles. Signed-off-by: Hassan Abouelela <[email protected]>
* Add Role Based Authorized ReadersGravatar Hassan Abouelela2022-02-05-14/+73
| | | | | | | Adds a new property on forms to declare which roles are authorized to access form responses. Signed-off-by: Hassan Abouelela <[email protected]>
* Overhaul Scope SystemGravatar Hassan Abouelela2022-02-05-60/+246
| | | | | | | Adds discord role support to the pre-existing scopes system to power more complex access permissions. Signed-off-by: Hassan Abouelela <[email protected]>
* Add Helper Functions For Managing RolesGravatar Hassan Abouelela2022-01-22-9/+130
| | | | Signed-off-by: Hassan Abouelela <[email protected]>
* Don't include user mention for anonymous form submissionsGravatar Chris Lovering2022-01-21-1/+5
| | | | | | We currently use WEBHOOK_ENABLED to determine whether user data should be stored to the db. However, when webhooking a form submission this config is ignored, and the user mention is always included if available. This means that if a user login in using another form, and then submits an anonymous form with the same session, their name will be included in the webhook.
* Model: makes Form.id case insensitiveGravatar Matteo Bertucci2021-12-26-11/+8
| | | | Note that it will make any existing form with an upper case letter impossible to access until its ID is changed, which shouldn't be the case in production according to @HassanAbouelela
* Hash Cf-Connecting-IP if given, else remote hostGravatar Joe Banks2021-12-25-1/+5
|
* Uses Backend URL In EmbedGravatar Hassan Abouelela2021-07-06-1/+1
| | | | | | | Temporarily switches the URL in discord embeds from the frontend, to the backend, to allow for easier viewing until the frontend is ready. Signed-off-by: Hassan Abouelela <[email protected]>
* Merge pull request #92 from python-discord/unittest_failuresGravatar Hassan Abouelela2021-06-20-16/+101
|\ | | | | Allow Unittest Failures
| * Updates Unittest Filter To Match New ModelGravatar Hassan Abouelela2021-06-19-1/+1
| | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]>
| * Verifies Unittest Error ResponsesGravatar Hassan Abouelela2021-06-03-1/+14
| | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]>
| * Handles Code Questions With No TestsGravatar Hassan Abouelela2021-06-03-1/+13
| | | | | | | | | | | | Adds a check to handle code questions with no test suites. Signed-off-by: Hassan Abouelela <[email protected]>
| * Clarify Validator SemanticsGravatar Hassan Abouelela2021-06-03-1/+1
| | | | | | | | | | Co-authored-by: Chris <[email protected]> Signed-off-by: Hassan Abouelela <[email protected]>
| * Adds Missing DocstringsGravatar Hassan Abouelela2021-06-02-0/+3
| | | | | | | | Signed-off-by: Hassan Abouelela <[email protected]>
| * Documents Return Code Gravatar Hassan Abouelela2021-06-02-0/+1
| | | | | | | | | | Adds a comment which explains when a certain return_code is used. Co-authored-by: Joe Banks <[email protected]>
| * Uses 422 For Failed Tests Gravatar Hassan Abouelela2021-06-02-1/+1
| | | | | | | | | | Uses 422 instead of 403 to indicate a test has failed. Co-authored-by: Joe Banks <[email protected]>