mirror of
https://github.com/opensourcepos/opensourcepos.git
synced 2026-09-21 10:15:01 -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
4.0 KiB
PHP
50 lines
4.0 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' => 'لايمكن حذف المستخدم admin الخاص بنسخة العرض.',
|
|
'error_grant_change_disallowed' => 'تم تعطيل تغييرات المنح في هذه النسخة التجريبية.',
|
|
'error_password_change_disallowed' => 'تم تعطيل تغييرات كلمة المرور في هذه النسخة التجريبية.',
|
|
'error_updating_admin' => '',
|
|
'error_updating_demo_admin' => 'لايمكن تغيير بيانات المستخدم 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' => 'اسم المستخدم مطلوب.',
|
|
];
|