Commit graph

30 commits

Author SHA1 Message Date
Sam
3812da26fd
Record server ID when creating report via API and display in staff panel (#3524) 2024-10-17 22:55:18 -07:00
Robin
6ffc956060 Remove input cleaning 2022-06-25 09:37:09 +02:00
samerton
133173f0ca Use null for reporting guests instead of 0 2022-06-02 17:51:59 +01:00
Robin
723cd7deb9 Typo 2022-05-25 11:00:34 +02:00
Tadhg Boyle
e3b51b7337 New namespaced API error codes (Closes #2779) 2022-05-24 23:05:15 -06:00
Tadhg Boyle
eb8841149d Remove unneeded = in where clauses 2022-05-01 23:22:19 -07:00
Partydragen
9987f5f4a3 Fix create report endpoint 2022-04-24 20:31:04 +02:00
Tadhg Boyle
f9051bc5a1 Normalize getDisplayname function 2022-04-21 08:13:58 -07:00
Partydragen
d2503a1ae0
User Integrations systems (#2606)
* Initial work for User Integrations systems

* Convert a few endpoints to new user integration system

* Finish minecraft part to new User Integration system

* Fixes verify banner issue https://github.com/NamelessMC/Nameless/issues/2052

Fixes https://github.com/NamelessMC/Nameless/issues/2052

* Convert discord to new user integrations system

* Update fields to show user integrations

* Add user integrations to StaffCP user page / move over

* Update UserInfo and Rename MinecraftVerify endpoint

* Rework user listing endpoint

* Password check never returns null

* Add support for offline mode uuid

* Fix documentation phpstan warnings

* else if

* remove die()

* Revamp registration page

* add integrations settings page

* Convert authme & fix phpstan issues

* refix settings page

* Load uuid when user is loaded

* Redirect user to complete required integrations

* Fix translation for user connections page

* Rework integrations registration in Register Endpoint

Completes https://github.com/NamelessMC/Nameless/issues/2516

* make getIntegration ignore case sensitive

* Update installer

* Update upgrader script to convert users

* Fix index for user integrations

* Remove uuid from user data

* Misc

* Remove one unused query

* Add event for integration linking, verify and unlink

* Finish user transformer, Finish user integrations

* Thx phpstan

* Fix phpdocs

* Fix user reports page

* Remove validation banner

* Change default field value

* resolve samerton feedback

* don't clean when inserting data

* don't clean event data

* remove more clean

* increase reset_code length from 60 to 64

* pr13 confirmed

* one more clean

* Remove API verification setting

* Register integrations edit permission

* Resolve a few requested changes

* Rework username and identifier validation

* Add button to sync user integration

* Fix Synchronisation text

* Fix is verified term

Co-authored-by: Robin <robinslot@hotmail.nl>
Co-authored-by: Robin <robin+git@rkslot.nl>
2022-04-16 17:42:24 +01:00
Tadhg Boyle
2abfabf91d Cleanup CreateReportEndpoint & add report origin constants (Closes #2440) 2022-02-19 23:20:45 -08:00
Tadhg Boyle
ba01cff3c3 Fix reported user variable 2022-02-19 10:12:20 -08:00
Tadhg Boyle
94625a1753 Fire createReport event within Report class 2022-01-30 18:27:15 -08:00
Tadhg Boyle
ad17142a16
Misc cleanup (#2566) 2022-01-15 15:18:05 -08:00
Tadhg Boyle
8b577ce1fc Fix API error code and route 2022-01-15 12:06:46 -08:00
Tadhg Boyle
c6a9f86f4d
API auth revamp (#2564) 2022-01-15 11:48:52 -08:00
Tadhg Boyle
42eb8f65f0 Use more appropriate HTTP status codes in API 2022-01-10 11:42:08 -08:00
Tadhg Boyle
1680427f6f Add API endpoint "route aliases"
This lets us make the endpoints main routes different while keeping backwards compatibility and REST-ifying the API
2022-01-10 01:37:06 -08:00
Tadhg
cdb6c27bd9 Add optional $status param to throwError and returnArray API methods + implement some 2021-11-20 21:56:50 -08:00
Tadhg
a9c678e4d4 convert all array(...) syntax to [...] 2021-10-29 22:00:05 -07:00
relavis
65f100b656
Add hook for report creation event (#2467) 2021-10-27 22:47:21 -07:00
samerton
14a7a1fe34 Add reported_username and reported_uid fields to createReport endpoint
Closes #2106
2021-10-09 17:24:40 +01:00
Tadhg
e40ab195ae fix #2106 2021-02-21 16:42:24 -08:00
Tadhg
103cab4e01 Add "Method" column to API endpoints table 2021-02-21 13:15:07 -08:00
Robin
cc73ba0c0c Fix #2077 2021-02-13 15:19:59 +01:00
Vladimír Urík
d25f7371f7 Fixed bug in isssue#2077 2021-02-13 15:10:12 +01:00
Tadhg
a96e228f7d add meta to endpoint errors 2021-01-19 09:15:45 -08:00
Derkades
281b424b59 Style fixes 2020-12-27 14:42:47 +01:00
Derkades
1c1cf834ef Remove unnecessary isValidated checking 2020-12-27 14:24:57 +01:00
Tadhg
426514f825 fix some api error code # 2020-12-06 16:26:09 -08:00
Tadhg Boyle
f93ac78041
Major API Changes (#1836)
* continue updating api

* Add Ingame Group Name dropdown if groups were sent by plugin

* add validation function for params, add docblocks

* revert call_user_func

* wip

* Modular API endpoints! WIP

* Modular endpoints wip

* fix some errors, get discord linking working again

* Add panel page for API Endpoints

* revert lastid rename

* Add Endpoint descriptions

* clean up some endpoints

* wip

* WIP (booleans, intval, mc integration work)

* wip

* discord secondary groups - WIP

* Fix some group sync form things

* add writable info to Server Compatibility. other fixes WIP

* redo group sync page logic

* fix some validation logic

* Add group order to group list

* Endpoint autoloader

* dont need that variable

* Add listUsers filters

* Rework #1839

* Move banned/active filters to query

* rename 'active' to 'verified'

* Use boolval function

* Use double negation instead of boolval

* use bool cast

* WIP syncing Secondary Groups

* wip Discord Role Syncing

* accidental html

* wrong order

* wip clean endpoints

* Test/Fix all endpoints

We are getting close to completion :confetti_balls:

* Add missing translations

* new class for Discord functions

* Add check if hooks exists on upgrade

* add missing admin permissions on install

* add discord role in setGroup endpoint

* #1876 - Add user language to userInfo endpoint

* Store report dates using unix timestamp

* Get language name via join in userInfo endpoint

* Add default language to info endpoint

* Uninstall instructions

* Fix user logic for real

* simpify discordBotRequest return value

Co-authored-by: samerton <samerton@users.noreply.github.com>
Co-authored-by: Derkades <robinslot@hotmail.nl>
2020-10-25 13:59:02 -07:00