aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
| | * | | | Merge branch 'master' into active-infractions-validationGravatar Sebastiaan Zeeff2019-10-18-124/+1389
| | |\ \ \ \ | | |/ / / / | |/| | | |
| | * | | | Prevent double active infractions with constraintGravatar Sebastiaan Zeeff2019-10-08-2/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/python-discord/site/issues/273 This commits adds a UniqueConstraint for active infractions on a combination of the `user` and `type` field. This means that a user can only have one active infraction of a given type in the database at any time. I've also added tests to make sure that this behaves as expected.
| | * | | | Migrate undesirable active infraction to inactiveGravatar Sebastiaan Zeeff2019-10-08-0/+754
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/python-discord/site/issues/273 This commit adds a data migration to migrate active infractions that should not be active to inactive. There are two types of infractions that this migration will migrate to inactive: - Infractions of types that should never be active (e.g. notes) - Secondary active infractions if a given user already has an active infraction of the same type. Since this makes the migration file fairly complex, I have written tests to make sure the migration works as expected. In order to do this, I've subclassed `django.test.TestCase` to create a `MigrationsTestCase` that takes care of reverting the database back to a state prior to the migrations we want to test and injects test data before applying the migrations we want to test. For more information, see `pydis_site.apps.api.tests.migrations.base` This implements the last part of and closes #273
| | * | | | Add validation rules to Infraction serializerGravatar Sebastiaan Zeeff2019-10-07-1/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/python-discord/site/issues/273 This commit adds validation rules to the Infraction serializer that validate if a given infraction should be accepted based on its status of being considered `active`. If the validation fails, the API will reject the request and return a 400 status. Specifically, this validator checks that: - infractions that can never be active do not have `active=True` set; - a user can never receive a second active infraction of the same type. Tests have been added to `test_infractions.py` to ensure that the validators work as expected. This commit implements the first part of #273
| | | * | | Merge branch 'master' into allauth-user-settingsGravatar Gareth Coles2019-10-28-35/+50
| | | |\ \ \ | |_|_|/ / / |/| | | | |
* | | | | | Merge pull request #301 from python-discord/new-rulesGravatar scragly2019-10-26-32/+18
|\ \ \ \ \ \ | |_|_|_|_|/ |/| | | | | Add new rules.
| * | | | | Add new rules.Gravatar scragly2019-10-26-32/+18
|/ / / / /
* | | | | Merge pull request #294 from bsoyka/patch-1Gravatar Sebastiaan Zeeff2019-10-25-2/+2
|\ \ \ \ \ | | | | | | | | | | | | Remove breadcrumb truncation
| * \ \ \ \ Merge branch 'master' into patch-1Gravatar Sebastiaan Zeeff2019-10-25-3/+32
| |\ \ \ \ \ | |/ / / / / |/| | | | |
* | | | | | Merge pull request #288 from python-discord/bot#466-reminder-jump_urlGravatar Sebastiaan Zeeff2019-10-25-1/+30
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add a jump_url field to the reminder model
| * \ \ \ \ \ Merge branch 'master' into bot#466-reminder-jump_urlGravatar Sebastiaan Zeeff2019-10-25-2/+2
| |\ \ \ \ \ \ | |/ / / / / / |/| | | | | |
| * | | | | | Add migrations for the reminder modelGravatar Akarys422019-10-21-0/+19
| | | | | | |
| * | | | | | Change reminder.jump_url field to URLFieldGravatar Akarys422019-10-21-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This make sure that the data receivied is valid
| * | | | | | Add max_lengh for reminder.jump_urlGravatar Akarys422019-10-19-0/+1
| | | | | | |
| * | | | | | Add a jump-url field in the reminder modelGravatar Akarys422019-10-19-1/+10
| | |/ / / / | |/| | | |
| | * | | | Remove breadcrumb truncationGravatar Benjamin Soyka2019-10-20-2/+2
| |/ / / / | | | | | | | | | | As per discussion in #meta
| | | * | Merge branch 'master' into allauth-user-settingsGravatar Gareth Coles2019-10-23-1/+1
| | | |\ \ | |_|_|/ / |/| | | |
* | | | | Merge pull request #297 from python-discord/constant-debug-secret-keyGravatar Mark2019-10-22-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Set SECRET_KEY to a constant in DEBUG mode
| * | | | | Set SECRET_KEY to constant in debug modeGravatar Sebastiaan Zeeff2019-10-22-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SECRET_KEY in debug mode was auto-generated each time the config file was loaded. This had the unwanted side-effect of requiring testers to login again on the site as the SECRET_KEY had changed during the reload process. This commit resolves that by turning it into a constant. Since having a constant secret results in the linting error `S105`, I have added a specific `noqa` ignore for that.
| | | * | Full coverage and finish cleanupGravatar Gareth Coles2019-10-23-5/+96
| | | | |
| | | * | Add user settings modal, with connections management and account deletionGravatar Gareth Coles2019-10-23-13/+310
| | | | |
| | | * | Add role mapping migration I forgot to commitGravatar Gareth Coles2019-10-23-0/+18
| | | | |
| | | * | Finalize orange and purple custom coloursGravatar Gareth Coles2019-10-22-3/+3
| | | | |
| | | * | New colours, as discussed on DiscordGravatar Gareth Coles2019-10-22-7/+7
| | | | |
| | | * | Full test coverage, better redirect testingGravatar Gareth Coles2019-10-22-4/+110
| | | | |
| | | * | Prevent user signup when they've never joined+verifiedGravatar Gareth Coles2019-10-22-13/+110
| | | | |
| | | * | Merge branch 'master' into allauth-user-settingsGravatar Gareth Coles2019-10-22-1/+1
| | | |\ \ | |_|_|/ / |/| | | |
* | | | | Add bulma content class to home page content for proper formatti… (#291)Gravatar scragly2019-10-23-1/+1
|\ \ \ \ \ | |_|_|_|/ |/| | | | Add bulma content class to home page content for proper formatting.
| * | | | Add bulma content class to home page content for proper formatting.Gravatar scragly2019-10-21-1/+1
| |/ / /
| | | * Implement account deletion at /accounts/deleteGravatar Gareth Coles2019-10-22-3/+76
| | | |
| | | * Merge branch 'master' into allauth-user-settingsGravatar Gareth Coles2019-10-22-0/+0
| | | |\ | |_|_|/ |/| | |
* | | | blank commit to trigger deploymentGravatar Derek2019-10-22-0/+0
|/ / /
| | * Update Django users with Discord username+discrim.Gravatar Gareth Coles2019-10-20-3/+40
| | | | | | | | | | | | This sets both the Django User's `username` and `first_name` params.
| | * Signals: Complete coverage in testsGravatar Gareth Coles2019-10-20-0/+41
| | |
| | * Tests for the new signal listener is_staff changesGravatar Gareth Coles2019-10-20-5/+26
| | |
| | * Add is_staff to role mappings, and the logic to go with itGravatar Gareth Coles2019-10-20-11/+63
| | |
| | * Signals: Move group changes outside of the loopGravatar Gareth Coles2019-10-20-6/+6
| | |
| | * GH signup prevention, views and templates for settings pagesGravatar Gareth Coles2019-10-20-5/+126
| | |
| | * Allauth: Re-add GitHub provider, prevent GH signupsGravatar Gareth Coles2019-10-19-0/+48
| | |
| | * Bring navbar styling in line on mobile as wellGravatar Gareth Coles2019-10-19-0/+10
| | |
| | * Initial navbar change to add settings button next to logoutGravatar Gareth Coles2019-10-19-3/+9
| |/ |/|
* | Add Code of Conduct to navbar submenuGravatar Sebastiaan Zeeff2019-10-17-0/+3
| | | | | | | | | | | | This commit adds a link to the Code of Conduct to the dropdown menu in the navbar. It does not include a direct link to the CoC policies, which are accessible via the Code of Conduct page.
* | Merge pull request #284 from python-discord/faviconsGravatar Johannes Christ2019-10-14-11/+9
|\ \ | | | | | | Forgot to update base.html template with favicon changes
| * \ Merge branch 'master' into faviconsGravatar ByteCommander2019-10-12-1/+1
| |\ \
| * | | Forgot to update base.html template with favicon changesGravatar ByteCommander2019-10-12-11/+9
| | | |
* | | | Merge pull request #286 from python-discord/wiki-polishGravatar Johannes Christ2019-10-14-77/+60
|\ \ \ \ | | | | | | | | | | Wiki polish (RE: Allauth)
| * | | | Wiki: Show breadcrumb without menus for users that can't edit, without the ↵Gravatar Gareth Coles2019-10-14-52/+58
| | | | | | | | | | | | | | | | | | | | root shown
| * | | | Wiki: Remove Django messages from Wiki templatesGravatar Gareth Coles2019-10-14-25/+0
| | | | | | | | | | | | | | | | | | | | We've already got this handled in the main base template for the site.
| * | | | Wiki: Hide breadcrumbs bar if the user can't editGravatar Gareth Coles2019-10-14-1/+3
|/ / / /
* | | | Wiki: Permissions hotfix (#285)Gravatar scragly2019-10-14-0/+24
|\ \ \ \ | | | | | | | | | | Wiki: Permissions hotfix