Commit graph

1920 commits

Author SHA1 Message Date
Slendy
91e792aea0
Fix level ordering in busiest slots 2023-06-14 11:16:16 -05:00
Slendy
15a3cbea42
Fix MySQL health check and use latest tag 2023-06-13 22:25:59 -05:00
Michael Youngling
170e824e96
Revert "Add online users endpoint to user API" (#790)
Revert "Add online users endpoint to user API (#789)"

This reverts commit d1e21b4e18.
2023-06-11 20:27:38 +00:00
koko
d1e21b4e18
Add online users endpoint to user API (#789)
* Add /api/v1/users/online endpoint

* Fix chaining style

* Return empty list if none online

* Return by ascending login time and limit to 50

* Improve pagination clamping

* Correct login time sort
2023-06-11 17:13:19 +00:00
Slendy
ecdce826fb
Modify slot unit test to reflect sub level change 2023-06-10 23:08:32 -05:00
Slendy
db5d9c2a39
Fix sublevels not loading 2023-06-10 23:03:05 -05:00
dependabot[bot]
dc3a9a75b1
Bump dotnet-trace from 7.0.421201 to 7.0.430602 (#788)
Bumps [dotnet-trace](https://github.com/dotnet/diagnostics) from 7.0.421201 to 7.0.430602.
- [Release notes](https://github.com/dotnet/diagnostics/releases)
- [Commits](https://github.com/dotnet/diagnostics/compare/v7.0.421201...v7.0.430602)

---
updated-dependencies:
- dependency-name: dotnet-trace
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-09 17:03:09 +00:00
koko
77e46a0721
Refactor error modal into its own partial (#785)
* Refactor error modal into its own partial

* Fix unresolved error string in TwoFactorPartial

* Use tuple model instead of ViewData for error title and message

* Apply suggestions from code review
2023-06-08 04:01:59 +00:00
koko
af6fdb457b
Bump Selenium.WebDriver from 4.9.1 to 4.10.0 (#787)
Manually bumping Selenium.WebDriver to 4.10.0 because Dependabot was having some issues with status checks.
2023-06-07 18:38:26 +00:00
Josh
2f11731a8e
Refactor NpTicket parser and add NpTicket signature documentation (#784)
* Refactor NpTicket parser and add NpTicket signature documentation

* Update TickerBuilder chaining style

* Fix SectionHeader position returning wrong value

* Don't attempt to parse ticket if it is less than 8 bytes
2023-06-07 05:16:29 +00:00
Slendy
8b0aed9a61
Fix level photos by author 2023-06-06 23:30:37 -05:00
Slendy
d4b9ca666b
Add ordering to LBP2 search 2023-06-06 23:16:54 -05:00
dependabot[bot]
5af66ec850
Bump Microsoft.NET.Test.Sdk from 17.6.1 to 17.6.2 (#783)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.6.1 to 17.6.2.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](https://github.com/microsoft/vstest/compare/v17.6.1...v17.6.2)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-06 17:46:30 +00:00
github-actions[bot]
d79b1dbf52
Update the localization files (#778)
[skip ci] Update the localization files

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
Co-authored-by: koko <koko@drones.gay>
2023-06-05 18:14:57 -05:00
Josh
a69d94054b
Simplify filters and make cross control slots not show by default (#782)
* Simplify filters and make cross control slots not show by default
Also sort author levels by oldest levels first rather than newest levels first.

* Fix unit test expecting slots to sorted by timestamp descending

* Remove errant whitespace
2023-06-05 22:53:41 +00:00
koko
2a85b6a136
Disallow moderators/administrators from issuing cases against each other (#781)
* Disallow moderators/administrators from issuing cases against each other

* Resolve suggestions from reviewers

* Only request user from db if id is valid
2023-06-05 21:45:25 +00:00
koko
572c942ee8
Implement pride logo & necessary configuration options (#780)
* Implement pride logo as well as needed configuration option

* Potentially fix issue with icons not rendering

* Fix login form icon and remove unused image from PasswordResetPage
2023-06-02 14:21:56 +00:00
dependabot[bot]
2609ec8407
Bump Microsoft.NET.Test.Sdk from 17.6.0 to 17.6.1 (#779)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.6.0 to 17.6.1.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](https://github.com/microsoft/vstest/compare/v17.6.0...v17.6.1)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-06-01 17:04:51 +00:00
Slendy
bc83d1e9f5
Change name of anonymous variable so it doesn't overwrite local variable 2023-05-31 21:33:05 -05:00
Slendy
c9784cf8c9
Fix hearted profiles being sorted in reverse order 2023-05-31 21:25:35 -05:00
Slendy
b29120a482
Fix typo in IconHash query 2023-05-31 20:46:52 -05:00
Slendy
bee3e39c74
Separate user and icon query in GameUserSlot 2023-05-31 20:45:52 -05:00
Slendy
92b631c533
Fix GameUserSlot icon and username query 2023-05-31 20:43:49 -05:00
Slendy
0b936d3e5d
Implement deleting playlists
Also fixes playlists visually not updating in-game when modifying them
2023-05-31 20:37:17 -05:00
Slendy
cd926a8415
Refactor LBP3 text search to use the category system 2023-05-31 20:35:39 -05:00
Slendy
2ec6bff8e2
Fix number of returned slots being capped at 30 2023-05-31 19:06:36 -05:00
Josh
0c1e350fa3
Rewrite gameserver slot filter system (#763)
* Initial implementation of new slot sorting and filtering system

* Initial implementation of filtering for lbp3 community tab

* Add support for organization on lbp3

* Add playlist and user categories

* Implement unit tests for all filters
Refactor more systems to use PaginationData

* Fix PlayerCountFilter test

* Add more unit tests and integration tests for the filter system

* Fix LBP2 move filter and gameFilterType

* Fix sort by likes in LBP3 category

* Add sort for total plays

* Remove extra whitespace and make styling more consistent

* Order hearted and queued levels by primary key ID

* Fix query without order warnings
2023-05-31 21:33:39 +00:00
Slendy
de228cb242
Fix client side query in BannedPage 2023-05-31 15:12:40 -05:00
Slendy
b0a57f05f9
Update crowdin actions 2023-05-31 15:09:47 -05:00
koko
b4efba7f14
Patch account suspended page display issues (#777)
Remove excess heading and fix incorrect mod case display
2023-05-31 18:40:58 +00:00
github-actions[bot]
5c9819cce6
Update the localization files (#775)
[skip ci] Update the localization files

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>

If this breaks something, blame koko for convincing me to merge this
2023-05-31 14:18:41 -04:00
github-actions[bot]
8894e54023
Update the localization files (#774)
[skip ci] Update the localization files

Co-authored-by: Crowdin Bot <support+bot@crowdin.com>
2023-05-30 15:19:19 -05:00
koko
21dbdff20a
Add proper ban page when logging in (#773)
* Add proper ban page upon logging in

* Remove two extra line break tags that don't need to be there

* Fix timestamp formatting

* Properly display timestamps in correct timezone

* Fix formatting issues with ban page

* Remove extra parenthesis which would be rendered on-page

* Add to redirect middleware to prevent navigating to other pages

* Small nitpick, renaming UserBannedPage to BannedUserPage

* Resolve nitpicks from reviewers

* Remove un-necessary log message in LoginForm

* Fix ban reason translatable string argument

* Word choice nitpick ("Ban Created" -> "Ban Issued")

* Final adjustments and nitpicks, visual and grammatical

* Resolve requested changes from reviewers
2023-05-30 19:25:31 +00:00
Slendy
c8c54d78de
Fix dockerfile output path 2023-05-29 20:08:37 -05:00
Slendy
2c69644beb
Allow moderators to access individual reports. 2023-05-26 02:27:11 -05:00
dependabot[bot]
f2be297620
Bump coverlet.collector from 3.2.0 to 6.0.0 (#771)
Bumps [coverlet.collector](https://github.com/coverlet-coverage/coverlet) from 3.2.0 to 6.0.0.
- [Release notes](https://github.com/coverlet-coverage/coverlet/releases)
- [Commits](https://github.com/coverlet-coverage/coverlet/compare/v3.2.0...v6.0.0)

---
updated-dependencies:
- dependency-name: coverlet.collector
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-22 17:33:38 +00:00
koko
9646dea44a
Fix mod reason/notes overflow issue & show expiration time if applicable (#765)
* Fix mod reason/notes overflow issue & show expiration time if applicable

* Remove extra whitespace

* Wrap using line break instead of overflow scroll bar

* Remove un-required overflow inline style
2023-05-22 01:40:34 +00:00
dependabot[bot]
67b29f2689
Bump Microsoft.EntityFrameworkCore.InMemory from 7.0.4 to 7.0.5 (#769)
Bumps [Microsoft.EntityFrameworkCore.InMemory](https://github.com/dotnet/efcore) from 7.0.4 to 7.0.5.
- [Release notes](https://github.com/dotnet/efcore/releases)
- [Commits](https://github.com/dotnet/efcore/compare/v7.0.4...v7.0.5)

---
updated-dependencies:
- dependency-name: Microsoft.EntityFrameworkCore.InMemory
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 17:57:07 +00:00
dependabot[bot]
1a64860fea
Bump Microsoft.NET.Test.Sdk from 17.5.0 to 17.6.0 (#768)
Bumps [Microsoft.NET.Test.Sdk](https://github.com/microsoft/vstest) from 17.5.0 to 17.6.0.
- [Release notes](https://github.com/microsoft/vstest/releases)
- [Changelog](https://github.com/microsoft/vstest/blob/main/docs/releases.md)
- [Commits](https://github.com/microsoft/vstest/compare/v17.5.0...v17.6.0)

---
updated-dependencies:
- dependency-name: Microsoft.NET.Test.Sdk
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 17:56:47 +00:00
dependabot[bot]
9c4d6e0c76
Bump Redis.OM from 0.5.1 to 0.5.2 (#767)
Bumps [Redis.OM](https://github.com/redis/redis-om-dotnet) from 0.5.1 to 0.5.2.
- [Release notes](https://github.com/redis/redis-om-dotnet/releases)
- [Commits](https://github.com/redis/redis-om-dotnet/compare/v0.5.1...v0.5.2)

---
updated-dependencies:
- dependency-name: Redis.OM
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 17:56:38 +00:00
Slendy
4c6f2f0e16
Fix CI not running when it should 2023-05-15 15:06:08 -05: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
Slendy
02f520c717
Fix account unlinking 2023-05-14 14:50:43 -05:00
dependabot[bot]
5e08400170
Bump Selenium.WebDriver.ChromeDriver from 112.0.5615.4900 to 113.0.5672.6300 (#760)
Bump Selenium.WebDriver.ChromeDriver

Bumps [Selenium.WebDriver.ChromeDriver](https://github.com/jsakamoto/nupkg-selenium-webdriver-chromedriver) from 112.0.5615.4900 to 113.0.5672.6300.
- [Release notes](https://github.com/jsakamoto/nupkg-selenium-webdriver-chromedriver/releases)
- [Changelog](https://github.com/jsakamoto/nupkg-selenium-webdriver-chromedriver/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/jsakamoto/nupkg-selenium-webdriver-chromedriver/compare/v.112.0.5615.4900...v.113.0.5672.6300)

---
updated-dependencies:
- dependency-name: Selenium.WebDriver.ChromeDriver
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-11 16:59:53 +00:00
dependabot[bot]
6bef1d5390
Bump Selenium.WebDriver from 4.9.0 to 4.9.1 (#762)
Bumps Selenium.WebDriver from 4.9.0 to 4.9.1.

---
updated-dependencies:
- dependency-name: Selenium.WebDriver
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-08 16:26:13 +00:00
Slendy
8cd1d86de8
Make FriendResponse extend ILbpSerializable 2023-05-05 13:07:41 -05:00
koko
613984c69d
Add moderation/permission info to /api/v1/user (#761)
* Add moderation / permission info to /api/v1/user

* Consolidate everything into a single PermissionLevel reference
2023-05-04 21:35:15 +00:00
jackcaver
9deff7ce63
Implement basic filters and LBP2 CrossController fixes (#758)
* implement basic filters and lbp2cc fixes

* lbp3 hide lbp2cc slots

* hide lbp2cc levels from hearted and most played categories in lbp3 and basic filters for lbp3

---------

Co-authored-by: jackcaver <jackcaver@users.noreply.github.com>
Co-authored-by: koko <koko@drones.gay>
2023-05-04 14:42:31 +00:00
dependabot[bot]
ab353c502f
Bump Redis.OM from 0.5.0 to 0.5.1 (#759)
Bumps [Redis.OM](https://github.com/redis/redis-om-dotnet) from 0.5.0 to 0.5.1.
- [Release notes](https://github.com/redis/redis-om-dotnet/releases)
- [Commits](https://github.com/redis/redis-om-dotnet/compare/v0.5.0...v0.5.1)

---
updated-dependencies:
- dependency-name: Redis.OM
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-03 17:25:20 +00:00
Slendy
38e97a904a
Make FriendsController return text/xml 2023-05-02 21:05:41 -05:00