Commit graph

23 commits

Author SHA1 Message Date
Josh
e43397ac6a
Implement property dependency injection for the website (#806)
* Remove most non DI usages of DbContext

* Optimize website queries and refactor startup to use top level statements

* Remove unused functions in UserEntity and SlotEntity

* Optimize LBP1 LevelTags
2023-06-20 05:02:24 +00:00
Josh
a0d021f1e2
Refactor RepeatingTaskHandler (#796)
* Refactor RepeatingTaskHandler into an ASP.NET service

* Add unit tests for RepeatingTaskService

* Make repeating task unit tests work independent of time

* Fix weird behavior when task is canceled
2023-06-17 19:48:24 +00:00
Josh
1bf4ed6218
Add more unit tests (#757)
* Reorganize tests into unit/integration pattern

* Make DbSets virtual so they can be overridden by tests

* Add MessageControllerTests

* Implement DigestMiddlewareTests

* Refactor SMTPHelper to follow DI pattern which allows for mocking in unit tests.

* Fix MailQueueService service registration and shutdown

* Implement tests for Status and StatisticsController and reorganize tests

* Start working on UserControllerTests

* Start refactoring tests to use In-Memory EF provider

* Refactor integration tests to reset the database every time
Change default unit testing database credentials

* Update credentials to use default root with different passwords

* Throw exception when integration db is not available instead of falling back to in-memory

* Evaluate DbConnected every time

* Remove default DbContext constructor

* Setup DbContexts with options builder

* Convert remaining Moq DbContexts to InMemory ones

* Add more tests and use Assert.IsType for testing status code

* Add collection attribute to LighthouseServerTest

* Remove unused directives and calculate digest in tests

* Fix digest calculation in tests

* Add test database call

* Clear rooms after each test

* Fix CommentControllerTests.cs

* Disable test parallelization for gameserver tests

* Fix failing tests

Fix SlotTests

Make CreateUser actually add user to database

Fix dbConnected Lazy and change expected status codes

Properly Remove fragment from url for digest calculation

Fix digest calculation for regular requests

[skip ci] Remove unused directive

Don't use Database CreateUser function

Get rid of userId argument for generating random user

Rewrite logic for generating random users

Fix integration tests

* Implement changes from self-code review

* Fix registration tests

* Replace MailQueueService usages with IMailService
2023-05-15 15:00:33 -05:00
Josh
3aa9033b67
Rewrite captcha system (#754)
Rewrite captcha and remove many unused directives
2023-04-29 04:32:42 +00:00
Slendy
78dd5b6489
Add KnownProxies in appsettings for load balancers/docker 2023-02-24 00:28:36 -06:00
Slendy
cf1adbe640
Make the rate limiter more thread safe 2023-02-18 04:33:09 -06:00
Josh
64b95e807d
Refactor Database class (#616)
Refactor Database into DatabaseContext
Moved into separate folder so it actually has a namespace instead sitting in the root
2023-02-15 23:54:30 -06:00
Josh
7d187ee982
Change login UI and improve email setup flow (#619)
* Rework login UI design and change email setup flow

* Remove unused middleware

* Fix button not lining up with input fields
2023-01-09 19:43:56 -06:00
Josh
3ad211e5c8
Implement POST request rate limiting (#490)
* Initial work for rate limiting

* Refactor GameServerStartup and change default rate limit config

* Adjust config naming and add Enabled option to global and override rate limits

* Fix LBP3 republish bug

* Fix bugs in rate limiting and allow for multiple matched overrides

* Add this qualifier for private variable

* Changes from self review
2022-09-24 17:18:28 -05:00
Josh
f6a7fe6283
User settings, level settings, language and timezone selection and more. (#471)
* Initial work for user settings page

* Finish user setting and slot setting pages

* Don't show slot upload date on home page and fix team pick redirection

* Fix upload image button alignment on mobile

* Fix image upload on iPhone

* Remove unused css and add selected button color

* Fix login email check and bump ChromeDriver to 105

* Remove duplicated code and allow users to leave fields empty

* Add unpublish button on level settings and move settings button position

* Don't show edit button on mini card

* Self review bug fixes and users can no longer use an in-use email
2022-09-17 14:02:46 -05:00
jvyden
3e8344c8f3
Refresh the website's UI
Squashed commit of the following:

commit 47d268cc29560e72b5102eabc80d1f5743c103bb
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 21:14:09 2022 -0400

    Make profile pictures square

commit a5ae8a53918708fea215a5676beea2116078bd34
Merge: f5d8a9e f06fcc4
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 18:43:26 2022 -0400

    Merge branch 'main' into ui-refresh

commit f5d8a9e5ed2d9aaafd63d113a5b064d042f7ba48
Merge: fbf1695 2ad9804
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 17:03:33 2022 -0400

    Merge branch 'main' into ui-refresh

commit fbf16953893b2e294df21a0c60e561dbb409aa92
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 17:02:32 2022 -0400

    Fix test failures

commit 70cb5513cb8bae9d85b2b04bc9a3fb194f0a66a5
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 16:56:43 2022 -0400

    Improve 404 logic

commit b2743c4c8af736d2501c7bdd47cce19a6a01902d
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 16:44:36 2022 -0400

    Add 404 page

commit 3d0926d3c99d347617e5147ac632d8ec6bab18f9
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 16:27:03 2022 -0400

    Update icons for slots and team picks

commit c61405d83d71d9e67ab4c2775f76b3f7d6c2e827
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 16:12:45 2022 -0400

    Add background color, put content on segment

commit f7d9ee6a0accc9d664f8d2aefabcce4eb8789cd6
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 15:53:58 2022 -0400

    Add colors to mod/admin panel buttons, update fomantic

commit e680c5e6eb14f22792dc62bda029072d3f11f423
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 03:20:16 2022 -0400

    Fix landing page title

commit c779aa4b417af623aa47db0ce9875f49a9ee5c4b
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 03:13:32 2022 -0400

    Remove useless css

commit 57f6387c1214b319fe3e0b14df32a7bbecf51548
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 03:11:45 2022 -0400

    Add hover effect to logo

commit 15746911f92037abec115a83fa625ef0fda39e3a
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 02:39:04 2022 -0400

    Change currently_online string to english better

commit b98a90f1e9f0b3af7e65104cdd0acbc74c6a244e
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 02:33:41 2022 -0400

    Run GameApiTests sequentially, fix web tests

commit 630c08d3b80b74be11b0648b24011f89de705130
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 02:20:01 2022 -0400

    Add user links to comments

commit a91f136c87bc973300c74d6f97696cd7cbf1046a
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 02:14:22 2022 -0400

    Add ability for photos to have user links

commit d9e2a58e37dafe842b0b10b463cde1a2cb962052
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 01:33:21 2022 -0400

    Add ability to link to users and include their profile picture

commit 200196ce1f58638da7da368025ec0a88cacc14b6
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 01:33:07 2022 -0400

    Rename "users" to "people" in Landing Page

commit 07d229821099c069979a21bbd529b549c6f4e6b6
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 00:59:17 2022 -0400

    Fix bug with name on mobile

commit aecad7aeb69b63c0e517e85fba0c4de292d202f4
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 00:44:56 2022 -0400

    Make gap between header and title 17px

commit 46fa79b84e46b7ae90232724d82f7bd9e1a74f17
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 00:40:00 2022 -0400

    Fix user card stats oddity

commit 3b4c19f5b7e0199baeb88e27c918fbb17b5f777a
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 00:24:38 2022 -0400

    Mobile improvements, make avatars rounded

commit cf9533410042cabf456be0cba34ac5d80ef86046
Author: jvyden <jvyden@jvyden.xyz>
Date:   Fri Aug 19 00:02:01 2022 -0400

    Redesign header

commit f24aec0367d8375f3eaea94ea3579d86256c94be
Author: jvyden <jvyden@jvyden.xyz>
Date:   Thu Aug 18 23:36:42 2022 -0400

    Fix runtime compilation not working

commit 3147e12865feecf792a46088711691160c76b0c6
Author: jvyden <jvyden@jvyden.xyz>
Date:   Thu Aug 18 22:43:21 2022 -0400

    Add support for custom fomantic theme
2022-08-19 21:15:41 -04:00
jvyden
7f91393f41
Fix runtime compilation not working 2022-08-19 02:40:18 -04:00
Mondanzo
77edfed0be
Merge pull request #385
* Update default language to be en instead of en-US

* Update DefaultRequestCulture to be en
2022-07-30 17:35:58 -04:00
jvyden
40b3ebdc6c
Fix languages not changing 2022-07-26 18:16:14 -04:00
jvyden
bac1cad9f2
Merge branch 'main' into crowdin 2022-07-26 16:15:53 -04:00
jvyden
eb21c7042f
Only allow a single approved IP address 2022-06-11 18:43:30 -04:00
jvyden
8adbab15d1
Use request localization in website startup 2022-06-10 04:31:37 -04:00
jvyden
8e2bd1da3d
Revert "Use https redirection on non-debug builds"
This reverts commit dce683a58c.
2022-05-20 22:15:20 -04:00
jvyden
dce683a58c
Use https redirection on non-debug builds 2022-05-20 22:11:53 -04:00
jvyden
4b9c16da75
Fix release building 2022-05-15 21:53:57 -04:00
jvyden
08be90aadc
Organize middlewares 2022-05-15 10:31:45 -04:00
jvyden
3e031a342f
Fix website tests failing 2022-05-14 23:50:36 -04:00
jvyden
b2ec7eae57
Move servers to LBPU.PL.Servers 2022-05-14 23:37:55 -04:00
Renamed from ProjectLighthouse.Website/Startup/WebsiteStartup.cs (Browse further)