[Server] Serve card-art rules and params through the database interface (#7850)

The four card-art commands still prepared their statements inline through
Servatrice_DatabaseInterface: the two card_art_params updates in
cmdSetCardArtParams, the rule upsert and delete, and the rule listing that
mapped rows to protocol entries. Add CardArtRuleRecord, upsertCardArtRule,
removeCardArtRule, getCardArtRules, setCardArtParams and clearCardArtParams to
Server_DatabaseInterface with fail-closed defaults, implement them with the
previous statements, and keep the validation, clamping, in-memory userInfo sync
and broadcast in the handler.
This commit is contained in:
BruebachL 2026-11-10 12:16:30 +01:00 • committed by GitHub
parent 2608228bdd
commit 1822d16a72
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 140 additions and 38 deletions

View file

@ -283,6 +283,15 @@ public:
int clearBlacklistedBanners() override;
bool getUserAdminFlags(const QString &userName, int &adminFlags) override;
bool isCardArtAllowed(const QString &cardName, const QString &cardProviderId) override;
bool upsertCardArtRule(const QString &cardName,
const QString &cardProviderId,
const QString &mode,
const QString &reason,
int createdBy) override;
bool removeCardArtRule(const QString &cardName, const QString &cardProviderId) override;
bool getCardArtRules(QList<CardArtRuleRecord> &rules) override;
bool setCardArtParams(int userId, const QString &paramsJson) override;
bool clearCardArtParams(int userId) override;
bool addForgotPassword(const QString &user) override;
bool removeForgotPassword(const QString &user) override;
bool doesForgotPasswordExist(const QString &user) override;