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.2 KiB
PHP
50 lines
4.2 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' => 'Login',
|
|
'manager' => '',
|
|
'new' => 'Нов служител',
|
|
'none_selected' => 'Не сте избрали служител (и), който да изтриете.',
|
|
'one_or_multiple' => 'служител (и)',
|
|
'password' => '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' => 'Потребителското име е задължително поле.',
|
|
];
|