Commit graph

27 commits

Author SHA1 Message Date
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
f03d1d7c17
Utilize EF 7 bulk delete operations instead of RemoveRange 2023-04-18 20:45:42 -05:00
Slendy
4150e44f80
Refactor code for reading the body of a request 2023-04-06 22:23:49 -05:00
Josh
329ab66043
Refactor serialization system (#702)
* Initial work for serialization refactor

* Experiment with new naming conventions

* Mostly implement user and slot serialization.
Still needs to be fine tuned to match original implementation
Many things are left in a broken state like website features/api endpoints/lbp3 categories

* Fix release building

* Migrate scores, reviews, and more to new serialization system.
Many things are still broken but progress is steadily being made

* Fix Api responses and migrate serialization for most types

* Make serialization better and fix bugs
Fix recursive PrepareSerialization when recursive item is set during root item's PrepareSerialization, items, should be properly indexed in order but it's only tested to 1 level of recursion

* Fix review serialization

* Fix user serialization producing malformed SQL query

* Remove DefaultIfEmpty query

* MariaDB doesn't like double nested queries

* Fix LBP1 tag counter

* Implement lbp3 categories and add better deserialization handling

* Implement expression tree caching to speed up reflection and write new serializer tests

* Remove Game column from UserEntity and rename DatabaseContextModelSnapshot.cs back to DatabaseModelSnapshot.cs

* Make UserEntity username not required

* Fix recursive serialization of lists and add relevant unit tests

* Actually commit the migration

* Fix LocationTests to use new deserialization class

* Fix comments not serializing the right author username

* Replace all occurrences of StatusCode with their respective ASP.NET named result
instead of StatusCode(403) everything is now in the form of Forbid()

* Fix SlotBase.ConvertToEntity and LocationTests

* Fix compilation error

* Give Location a default value in GameUserSlot and GameUser

* Reimplement stubbed website functions

* Convert grief reports to new serialization system

* Update DatabaseModelSnapshot and bump dotnet tool version

* Remove unused directives

* Fix broken type reference

* Fix rated comments on website

* Don't include banned users in website comments

* Optimize score submission

* Fix slot id calculating in in-game comment posting

* Move serialization interfaces to types folder and add more documentation

* Allow uploading of versus scores
2023-03-28 00:39:54 +00:00
Josh
fa5ff0b490
Add a discord webhook for when users join for the first time. (#698)
* Add a discord webhook for when users join for the first time.

* Fix compilation error related to embed colors

* Make config migration backup use the version of the stored file

* Make DiscordConfiguration not halt startup

* Allow the registration message to be configured

* Clean up registration announcement and add userId variable

* Fix userid resolution and convert newline string to actual character
Also make WebhookHelper not fail if all destinations aren't configured
2023-03-23 00:57:28 +00: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
f1c5ad4002
Major refactor and reorganization of types (#652)
* Start of reorganization and cleanup

* Remove duplicate title id

* Refactor types

* Fix Release building

* Move classes in /Types to a Types namespace

* Fix compilation error (RoomVisualizerPage strikes again)

* Fix bugs created from auto merge

* Fix auto-merge compilation error

* Changes from review/fix failed merge
2023-02-13 22:02:58 -06:00
Josh
19ea44e0e2
Rework login and registration systems (#600)
* Initial work for verifying login ticket signatures

* Add candidate psn public key

* Add candidate psn public key and fix nuget packages

* Finalize npticket changes

* Add support for ticket version 3.0

* Rework login system to link platform accounts instead of using ip addresses

* Make linked accounts green instead of blue

* Fix api building

* Fix unit tests

* Actually fix unit tests

* Set unit test user's linked platform

* Why was this the wrong default value?

* Fix username change code

* Make TicketHash hash the entire ticket instead of just the serial

* Send password setup email when user sets their email for the first time

* Changes from self review
2022-12-26 01:03:14 -08:00
Josh
b3a00da554
Refactor deserialization and authentication (#550)
* Refactor deserialization and more

* Refactor authentication flow

* Fix unit tests

* Make deserialization better
2022-11-10 21:14:16 -06:00
Josh
ded7628085
Add unimplemented LBP3 login field (#495)
* Add unsupported LBP3 features

* Add GameApiExternal config url

* Add more exempt urls to digest check

* Make exemptPathList static
2022-09-24 18:19:19 -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
Josh
d640c000aa
Implement LBP1 tags, stricter resource checking, and more (#463)
* Add LBP1 tags, more strict resource checking, and more.

* Fix unit tests

* Add more length checking to dependency parser

* Online editor problems

* Fix tests pt 2

* Self code review and fixed digest bugs

* Don't add content length if it was already set

* Fix status endpoint

* Fix review bug and simplify review serialization

* Fix a typo in review serialization

* Remove duplicated code and fix search

* Remove duplicate database call
2022-08-31 20:38:58 -05:00
jvyden
b6da930e20
Merge main into mod-panel 2022-08-05 17:02:19 -04:00
jvyden
4ba75f09a9
Make all tokens expire
Closes #335
2022-07-29 15:08:41 -04:00
jvyden
cc7022cf48
Merge branch 'main' into mod-panel 2022-07-27 16:55:16 -04:00
Toru the Red Fox
6525ebe3cb
lbpEnvVer parity (somewhat, GameServer) and player polaroid resolution fix (Website) (#373)
* lbp2 beta tweaks

* tweaks

* oops

* pls work

* PLS

* Update UserCardPartial.cshtml

* news reimplementation testing

trying to fix it for lbp1

* a

* configurable envver

* Make numeric revision numbers only usable on full clones

* little comment to describe what EnvVer is

* remove news (again)

* remove redundancy when dirty

* document envver stuff

* remove numeric versioning for upstream merge

* Revert "remove numeric versioning for upstream merge"

This reverts commit 3e7d8eccbc.

* Revert "Revert "remove numeric versioning for upstream merge""

This reverts commit 7fbe145b80.

* Delete gitIsShallowRepo.txt

* accidentally deleted the wrong line oops

* Update VersionHelper.cs

Co-authored-by: Jayden <jvyden@jvyden.xyz>
2022-07-27 20:03:44 +00:00
jvyden
f40c6ce894
Merge branch 'main' into mod-panel 2022-06-17 19:55:15 -04:00
jvyden
eb21c7042f
Only allow a single approved IP address 2022-06-11 18:43:30 -04:00
jvyden
b2e6f25265
Merge main into mod-panel 2022-06-10 04:01:06 -04:00
jvyden
ee541dbfae
Allow instance owners to provide custom name, Include server version in LbpEnvVer
This is the first step towards instance customization. Just a name for now ;)
2022-06-01 00:34:38 -04:00
jvyden
8301418085
Use permission level model for permissions
This is better. Because having 20 fucking columns for permissions is STUPID.
2022-05-22 15:51:02 -04:00
jvyden
630b38e7bb
Make logger a non-static class 2022-05-15 16:57:50 -04:00
jvyden
c345eeebb9
Massive organization of classes and namespaces 2022-05-15 16:45:00 -04:00
jvyden
e12a798fd5
Implement Redis for storing rooms 2022-05-15 12:04:10 -04:00
jvyden
330c01317d
Combine a bunch of helpers together, shuffle some things around 2022-05-15 00:24:22 -04:00
jvyden
71a97894ad
Remove broken and useless BlockDeniedUsers functionality 2022-05-15 00:13:40 -04:00
jvyden
b2ec7eae57
Move servers to LBPU.PL.Servers 2022-05-14 23:37:55 -04:00
Renamed from ProjectLighthouse.GameAPI/Controllers/LoginController.cs (Browse further)