mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-09-22 02:34:59 -04:00
fix(sales): gate per-record endpoints behind reports_sales grant (REDACTED) Cashiers holding only the base `sales` grant could reach per-sale endpoints (getRow, getEdit, postSave, getReceipt, getInvoice, getSendPdf, getSendReceipt) that require `reports_sales`. getManage() enforced this at the list level, but individual endpoints did not re-check. Regression tests added. Auth: - Introduce `IsLoggedIn` filter to centralize login checks across controllers - Replace custom `AccessDeniedRedirectException` with built-in `RedirectException` Employees: - Add `DISALLOW_PASSWORD_CHANGE` and `DISALLOW_GRANT_CHANGE` env vars to restrict credential and permission changes in locked-down environments - Extract `hasGrantsChanged()` to streamline `postSave` Refactor: - Rename snake_case variables to camelCase in Sales, Items, and Employees controllers for PSR-12 compliance - Use explicit `db_connect()` for transaction clarity in Items controller Fixes: - SMTP config entries fall back to defaults via null coalescing - Migration uses `DROP FOREIGN KEY` instead of `DROP CONSTRAINT` - Password hash upgrade only sets session on successful `hash_version` update - Correct lang key for unknown error in Module model Language: - Translate `error_grant_change_disallowed` / `error_password_change_disallowed` across all 44 supported locales with => alignment matching en reference - Fix "cannot be deleted" messages and misc typos across ~15 language files Tests: - Bootstrap seeder only once in ItemsCsvImportTest; close connection after - Restore `DISALLOW_GRANT_CHANGE` in teardown to prevent side effects - Use `uniqid()` for test user data to avoid collisions Signed-off-by: 17935339+objecttothis@users.noreply.github.com
50 lines
3.6 KiB
PHP
50 lines
3.6 KiB
PHP
<?php
|
|
|
|
return [
|
|
'administrator' => '',
|
|
'basic_information' => 'מידע',
|
|
'cannot_be_deleted' => 'לא ניתן למחוק עובדים נבחרים, לאחד או יותר יש מכירות בתהליך או שאתה מנסה למחוק את החשבון שלך.',
|
|
'change_employee' => '',
|
|
'change_password' => 'שנה סיסמה',
|
|
'clerk' => '',
|
|
'commission' => '',
|
|
'confirm_delete' => 'האם אתה בטוח שברצונך למחוק את העובדים שנבחרו?',
|
|
'confirm_restore' => 'האם אתה בטוח שברצונך לשחזר את העובדים שנבחרו?',
|
|
'current_password' => 'סיסמה נוכחית',
|
|
'current_password_invalid' => 'הסיסמה הנוכחית אינה חוקית.',
|
|
'employee' => 'עובד',
|
|
'error_adding_updating' => 'הוספה או עדכון של עובד נכשלה.',
|
|
'error_deleting_admin' => '',
|
|
'error_deleting_demo_admin' => 'לא ניתן למחוק את משתמש המנהל ההדגמה.',
|
|
'error_grant_change_disallowed' => 'שינויים בהרשאות מבוטלים בדמו זה.',
|
|
'error_password_change_disallowed' => 'שינויים בסיסמה מבוטלים בדמו זה.',
|
|
'error_updating_admin' => '',
|
|
'error_updating_demo_admin' => 'לא ניתן לשנות את משתמש המנהל ההדגמה.',
|
|
'language' => 'שפה',
|
|
'login_info' => 'כניסה',
|
|
'manager' => '',
|
|
'new' => 'עובד חדש',
|
|
'none_selected' => 'לא בחרת עובדים שברצונך למחוק.',
|
|
'one_or_multiple' => 'עובד(ים)',
|
|
'password' => 'סיסמה',
|
|
'password_minlength' => 'על הסיסמה להיות באורך של 8 תווים לפחות.',
|
|
'password_must_match' => 'סיסמאות לא תואמות.',
|
|
'password_not_must_match' => 'הסיסמה הנוכחית והסיסמה החדשה חייבות להיות ייחודיות.',
|
|
'password_required' => 'דרושה סיסמה.',
|
|
'permission_desc' => 'סמן את התיבות שלהלן כדי להעניק גישה למודולים.',
|
|
'permission_info' => 'הרשאות',
|
|
'repeat_password' => 'סיסמא בשנית',
|
|
'subpermission_required' => 'הוסף לפחות גישה אחת לכל מודול.',
|
|
'successful_adding' => 'הוספת עובד בהצלחה.',
|
|
'successful_change_password' => 'סיסמה שונתה בהצלחה.',
|
|
'successful_deleted' => 'נמחק בהצלחה',
|
|
'successful_updating' => 'עדכנת בהצלחה את פרטי העובד',
|
|
'system_language' => 'שפת מערכת',
|
|
'unsuccessful_change_password' => 'שינוי הסיסמה נכשל.',
|
|
'update' => 'עדכן עובד',
|
|
'username' => 'שם משתמש',
|
|
'username_duplicate' => '',
|
|
'username_minlength' => 'על שם המשתמש להיות באורך של 5 תווים לפחות.',
|
|
'username_required' => 'שם המשתמש הינו שדה חובה.',
|
|
];
|