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.3 KiB
PHP
50 lines
3.3 KiB
PHP
<?php
|
|
|
|
return [
|
|
'administrator' => '',
|
|
'basic_information' => 'Informasi Karyawan',
|
|
'cannot_be_deleted' => 'Karyawan terpilih tidak bisa dihapus satu atau lebih dari para pekerja telah memproses penjualan atau Anda mencoba untuk menghapus diri Anda sendiri.',
|
|
'change_employee' => '',
|
|
'change_password' => 'Ubah kata kunci',
|
|
'clerk' => '',
|
|
'commission' => '',
|
|
'confirm_delete' => 'Apakah Anda yakin ingin menghapus karyawan yang dipilih?',
|
|
'confirm_restore' => 'Anda yakin ingin mengembalikan karyawan terpilih?',
|
|
'current_password' => 'Kata kunci sekarang',
|
|
'current_password_invalid' => 'Kata kunci sekarang salah.',
|
|
'employee' => 'Karyawan',
|
|
'error_adding_updating' => 'Kesalahan menambah / memperbarui karyawan.',
|
|
'error_deleting_admin' => '',
|
|
'error_deleting_demo_admin' => 'Anda tidak dapat menghapus Demo admin user.',
|
|
'error_grant_change_disallowed' => 'Perubahan izin dinonaktifkan dalam demo ini.',
|
|
'error_password_change_disallowed' => 'Perubahan kata sandi dinonaktifkan dalam demo ini.',
|
|
'error_updating_admin' => '',
|
|
'error_updating_demo_admin' => 'Anda tidak dapat mengubah Demo admin user.',
|
|
'language' => 'Bahasa',
|
|
'login_info' => 'Info Login Karyawan',
|
|
'manager' => '',
|
|
'new' => 'Karyawan Baru',
|
|
'none_selected' => 'Anda belum memilih karyawan untuk dihapus.',
|
|
'one_or_multiple' => 'Karyawan',
|
|
'password' => 'Kata Sandi',
|
|
'password_minlength' => 'Kata kunci minimal terdiri dari 8 karakter.',
|
|
'password_must_match' => 'Kata Sandi tidak cocok.',
|
|
'password_not_must_match' => 'Kata kunci sekarang dan kata kunci baru harus unik.',
|
|
'password_required' => 'Kata Sandi wajib diisi.',
|
|
'permission_desc' => 'Tandai kotak di bawah ini untuk memberikan akses ke Modul.',
|
|
'permission_info' => 'Hak Akses Karyawan',
|
|
'repeat_password' => 'Ulang Kata Sandi',
|
|
'subpermission_required' => 'Paling tidak tambahkan satu hak akses untuk setiap modul.',
|
|
'successful_adding' => 'Anda telah berhasil menambahkan karyawan.',
|
|
'successful_change_password' => 'Kata kunci berhasil diubah.',
|
|
'successful_deleted' => 'Berhasil menghapus Kartu Hadiah',
|
|
'successful_updating' => 'Anda telah berhasil memperbarui karyawan',
|
|
'system_language' => 'Bahasa Sistem',
|
|
'unsuccessful_change_password' => 'Gagal mengubah kata sandi.',
|
|
'update' => 'Ubah Karyawan',
|
|
'username' => 'Nama Pengguna',
|
|
'username_duplicate' => 'Nama pengguna karyawan sudah digunakan. Silakan pilih yang lain.',
|
|
'username_minlength' => 'Nama Pengguna minimal 5 huruf.',
|
|
'username_required' => 'Nama Pengguna wajib diisi.',
|
|
];
|