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
3.5 KiB
PHP
50 lines
3.5 KiB
PHP
<?php
|
|
|
|
return [
|
|
'administrator' => '',
|
|
'basic_information' => 'Thông tin',
|
|
'cannot_be_deleted' => 'Không thể xóa các nhân viên đã chọn, một hay nhiều nhân viên đã xử lý bán hàng hoặc bạn đang cố xóa tài khoản của mình.',
|
|
'change_employee' => '',
|
|
'change_password' => 'Đổi mật khẩu',
|
|
'clerk' => '',
|
|
'commission' => '',
|
|
'confirm_delete' => 'Bạn chắc chắn muốn xóa các nhân viên được chọn không?',
|
|
'confirm_restore' => 'Bạn chắc chắn muốn hoàn lại các nhân viên được chọn không?',
|
|
'current_password' => 'Mật khẩu hiện tại',
|
|
'current_password_invalid' => 'Mật khẩu hiện tại không hợp lệ.',
|
|
'employee' => 'Nhân viên',
|
|
'error_adding_updating' => 'Gặp lỗi khi cập nhật hay thêm nhân viên.',
|
|
'error_deleting_admin' => '',
|
|
'error_deleting_demo_admin' => 'Bạn không thể xóa người dùng demo admin.',
|
|
'error_grant_change_disallowed' => 'Thay đổi quyền bị vô hiệu hóa trong bản demo này.',
|
|
'error_password_change_disallowed' => 'Thay đổi mật khẩu bị vô hiệu hóa trong bản demo này.',
|
|
'error_updating_admin' => '',
|
|
'error_updating_demo_admin' => 'Bạn không thể thay đổi người dùng demo admin.',
|
|
'language' => 'Ngôn ngữ',
|
|
'login_info' => 'Đăng nhập',
|
|
'manager' => '',
|
|
'new' => 'Nhân viên mới',
|
|
'none_selected' => 'Bạn chưa chọn bất kỳ một nhân viên nào để mà xóa.',
|
|
'one_or_multiple' => 'nhân viên',
|
|
'password' => 'Mật khẩu',
|
|
'password_minlength' => 'Mật khẩu phải dài ít nhất 8 ký tự.',
|
|
'password_must_match' => 'Mật khẩu không khớp nhau.',
|
|
'password_not_must_match' => 'Mật khẩu hiện tại và mới phải khác nhau.',
|
|
'password_required' => 'Mật khẩu là bắt buộc.',
|
|
'permission_desc' => 'Các hộp dấu kiểm phía dưới cấp quyền truy cập cho các mô đun.',
|
|
'permission_info' => 'Quyền hạn',
|
|
'repeat_password' => 'Gõ lại mật khẩu lần nữa',
|
|
'subpermission_required' => 'Thêm ít nhất một quyền cho từng mô đun.',
|
|
'successful_adding' => 'Đã thêm thành công nhân viên.',
|
|
'successful_change_password' => 'Đổi mật khẩu thành công.',
|
|
'successful_deleted' => 'Bạn đã xóa thành công',
|
|
'successful_updating' => 'Bạn đã cập nhật nhân viên thành công',
|
|
'system_language' => 'Ngôn ngữ hệ thống',
|
|
'unsuccessful_change_password' => 'Gặp lỗi khi thay đổi mật khẩu.',
|
|
'update' => 'Cập nhật Nhân viên',
|
|
'username' => 'Tài khoản',
|
|
'username_duplicate' => '',
|
|
'username_minlength' => 'Tài khoản phải dài ít nhất là 5 ký tự.',
|
|
'username_required' => 'Trường tài khoản là bắt buộc.',
|
|
];
|