Commit graph

30 commits

Author SHA1 Message Date
Slendy
c34b7f3e79
Revert website Forbid and Unauthorized method usage to StatusCode
This is because by default ASP.NET expects an authentication scheme to be registered when using these methods.
2023-03-30 19:23:11 -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
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
ace3678da7
Add some resource tests and other small changes (#638)
* Cleanup custom icon resources and add resource tests

* Don't delete old custom icons
2023-01-20 00:18:57 -06:00
Josh
f4cad21061
Website UI redesign and QOL changes (#601)
* Initial support for leaderboards and some refactoring

* Start of UI redesign

* Finish slot and user redesign, added deletion of comments, reviews, scores, and photos

* Remove leftover debug print

* Fix bug in permission check

* Simplify sidebar code and add hearted and queued levels

* Fix navbar scrolling on mobile and refactor SlotCardPartial
2022-12-19 15:20:49 -08:00
Slendy
c6ddeaf154
Allow moderators to dismiss reports 2022-11-17 16:14:03 -06: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
A My Sour
84e2914e40
Add webhook message when a new Team Pick is added (#528)
* Add webhook message when a new Team Pick is added

* Update ProjectLighthouse.Servers.Website/Controllers/Admin/ModerationSlotController.cs

Co-authored-by: Josh <josh@slendy.pw>

* Update ModerationSlotController.cs

* Include ServerConfiguration class

Co-authored-by: Alex_Sour <52638772+Alex-Sour@users.noreply.github.com>
Co-authored-by: Josh <josh@slendy.pw>
2022-11-05 15:35:10 -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
ef6acbb210
Add ability to hide levels 2022-08-05 21:44:17 -04:00
jvyden
842e161d7e
Add ability to ban users with a case 2022-08-05 21:12:10 -04:00
jvyden
4718970f6b
Add ability for cases to perform actions 2022-08-05 20:32:35 -04:00
jvyden
96e8c7f71e
Add support for dismissing cases 2022-08-05 19:07:43 -04:00
jvyden
b3d91fd470
Reduce CaseTypes to those that can be temporary 2022-08-05 17:18:43 -04:00
jvyden
b6da930e20
Merge main into mod-panel 2022-08-05 17:02:19 -04:00
Josh
add83a32a8
Prevent grief report deletion from removing slot rootLevel (#395) 2022-08-02 09:10:53 -04:00
jvyden
523c86f98f
Fix SetUserPermissionLevel route 2022-07-27 18:56:48 -04:00
jvyden
8ecca5d358
Add case for planet deletion 2022-07-27 18:52:47 -04:00
jvyden
7ba50e26f5
Add mod notes to ban cases, improve case display 2022-07-27 17:54:32 -04:00
jvyden
cdcc03fdc1
Add case generator for bans, allow mods to ban 2022-07-27 17:34:59 -04:00
jvyden
1eede416d4
Add case generation 2022-07-27 17:19:49 -04:00
jvyden
a6f077725a
Rename /modPanel to /moderation 2022-06-17 19:50:32 -04:00
jvyden
6c6a7f01f9
Add moderation cases log page 2022-06-10 21:21:27 -04:00
jvyden
693f0a3855
Add basic mod panel 2022-06-10 18:38:11 -04:00
jvyden
1037a6eddb
Add ability to change user's permissions from admin panel user list 2022-06-10 17:02:02 -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
33f344f200
Add admin button to wipe a user's earth decorations 2022-05-20 22:01:54 -04:00
jvyden
c345eeebb9
Massive organization of classes and namespaces 2022-05-15 16:45:00 -04:00
jvyden
b2ec7eae57
Move servers to LBPU.PL.Servers 2022-05-14 23:37:55 -04:00