OTP-Einstellungen in Plugin-Config & Integration von YCOM_CONFIG Endp…#515
Conversation
…oint
- OTP-Einstellungen werden im ycom/auth namespace (Plugin-Config) gespeichert
- statt Config-Values direkt aus der Datenbank zu holen, wird rex_ycom_config::get() verwendet
- dadurch sind die OTP-Konfigurationen über den Endpoint YCOM_CONFIG überschreibbar
- Anpassung der Dokumentation
There was a problem hiding this comment.
Pull Request Overview
This PR updates the OTP configuration retrieval for the ycom/auth plugin to allow OTP settings to be overwritten via the YCOM_CONFIG endpoint and improves the related documentation.
- Refactored OTP configuration retrieval from rex_addon::get to rex_ycom_config::get in both the yform value and injection handlers.
- Updated the plugin configuration fetching in settings-related methods to use rex_plugin::get, ensuring OTP settings are fetched from the correct context.
- Updated the documentation tables to include the new OTP configuration details.
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| plugins/auth/lib/yform/value/ycom_auth_otp.php | Refactored OTP config retrieval using rex_ycom_config::get. |
| plugins/auth/lib/injections/otp.php | Replaced direct addon config retrieval with rex_ycom_config::get and updated plugin fetching for settings. |
| docs/02_settings.md | Updated documentation to include OTP configuration table entries. |
Comments suppressed due to low confidence (3)
plugins/auth/lib/yform/value/ycom_auth_otp.php:15
- Consider verifying if a default value (like 0) should be provided here for consistency with calls in other parts of the code.
$otp_article_id = (int) rex_ycom_config::get('otp_article_id');
plugins/auth/lib/injections/otp.php:13
- Ensure that providing a default value of 0 in this context aligns with the intended configuration behavior and is consistent across the codebase.
$otp_article_id = (int) rex_ycom_config::get('otp_article_id', 0);
plugins/auth/lib/injections/otp.php:47
- Confirm that switching from rex_addon::get to rex_plugin::get for retrieving configuration in getSettingsContent is intended, as it may affect where configurations are stored.
$addon = rex_plugin::get('ycom', 'auth');
|
Hallo @dergel, der PR wurde gemeinsam von uns @iriswerner @j4ceee @alxndr-w eingereichtet, federführend entwickelt von @j4ceee im Rahmen seiner Abschlussarbeit und eines realen Projekts. Wäre klasse, den Anzunehmen oder Feedback zu erhalten, ob alles passt oder nicht. Tests wünschst du dir ja eigentlich und hier ist aufgefallen, dass was noch nicht passt. VG |
|
Vielen Dank @dergel im Namen auch der anderen. |
…oint