feat(settings): add menu/show_to_user and public get_settings for client apps

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-24 15:32:35 +03:30
co-authored by Cursor
parent 5c542e2733
commit b28a98938e
9 changed files with 321 additions and 44 deletions
+2 -2
View File
@@ -59,9 +59,9 @@ Montify → payment_url → درگاه بانکی
### ۳.۲. فیلتر `get_settings`
در `App\Models\Setting::isSecretOrServerOnlyKey()` و `SettingsController::authorizeSettingsPayload()`:
در `App\Models\Setting::isSecretOrServerOnlyKey()` و `Setting::forClientApi()`:
- درخواست عمومی (`api/get_settings` بدون auth ادمین) → کلیدهای محرمانه حذف می‌شوند.
- درخواست عمومی (`api/get_settings` بدون auth) → فقط ردیف‌های `show_to_user=1`؛ credential حذف می‌شود.
- پنل ادمین (`admin/get_settings` با `auth:user`) → همه کلیدها قابل مشاهده/ویرایش طبق `can_edit`.
کلیدهای مرتبط با پرداخت که به اپ عمومی نمی‌روند شامل: