Commit Graph

9 Commits

Author SHA1 Message Date
lokses 5c3c27e0af help + ad_connector + feed: база знаний и правки тестов
Раздел «Справка» (категории/статьи/предложка), правки ad_connector
и обновление тестов feed под обязательную 2FA.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-09-09 18:03:55 +03:00
lokses 70e5a77b04 Harden portal access and hiring, add RRO portal CRUD.
Remove the is_staff permission bridge, tighten intern credential handling with one-time PDFs and random seed passwords, and let staff manage cash registers from the portal.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-10 08:54:41 +03:00
lokses ae5c1f1848 Add RRO, portal section perms, dislocation presets, and hiring intern flow.
Ship cash-register registry, section-based portal access, configurable dislocation columns, and trial-hire intern accounts with credentials PDF.
2026-08-09 14:58:17 +03:00
lokses 04b1625fde Безопасность: закрытие 5 открытых находок ревью 25.07
- 2FA: убраны /api/ и /media/ из ALLOWED_PREFIXES — staff-сессия без TOTP
  больше не дотягивается до API/медиа (устройства в /api/ идут без staff-сессии)
- Nextcloud «Обмен»: writable только для staff (не для любого logged-in)
- Nextcloud путь отдела/адрес аптеки: safe_component() санитайзит сегмент
  (сепараторы/управляющие/ведущие точки) в провижининге и в браузере
- Mattermost: shared secret кнопки «Виконано» перенесён из query string в
  context (тело POST) — без утечки в логи/Referer
- Login: throttle на кэше (5 попыток / 5 мин, 429); logout только POST (CSRF),
  logout-ссылки в шаблонах → POST-формы

Тесты обновлены под enforcement 2FA (login_2fa helper) и новые правила.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-28 15:38:44 +03:00
lokses 81dee5cba2 Интеграции AD/Mattermost: OU-управление, импорт, шифрование токенов
- ad_connector: страницы управления OU и импорта из AD, поле ad_ou_dn
  в Directory, ADSyncLog; расширение sync-сервиса и клиента
- mattermost_connector: personal access token шифруется (Fernet,
  token_service), бот-сервис, команды создания бота и синхронизации;
  публикация постов в каналы. Тесты (19)
- core: ConnectorConfig, Directory (ad_ou_dn), обновления админки

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-22 17:32:26 +03:00
lokses c3f56f8a3e Portal redesign from template, real-data pages, test suite, Celery config
- templates: new shell from ACORE-template (mobile sidebar + bottom nav,
  themes, wallpaper, user dropdown), Django-ized nav with push-url;
  login rebranding; ACORE-template/ gitignored
- new pages wired to real data: databases (Directory types/counts),
  it-support (Ticket create form + my tickets), dashboard (live counters),
  structure (departments with head heuristic + pharmacy staffing status);
  static mockups for news/tasks/email/chat/purchases/hr-portal/help
- tests: 57 tests — ad_connector (ldap3 MOCK_SYNC client, sync scenarios,
  signals, mapping page), mattermost_connector (sync on mocks, bare-except
  regression), core (pages smoke, tickets, directories, tree rebuild)
- celery: add missing acore/celery.py app + CELERY_* settings (broker from
  env, eager mode without broker locally); wrap signal .delay calls so an
  unreachable broker no longer breaks employee saves

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 22:41:46 +03:00
lokses bfd67241c4 AD office-only scope, mapping page, auto-rebuild of directory tree
- ad_connector: restrict provisioning to office employees
  (user_location_type='office') in sync service, signals and command;
  disable AD account on transfer out of office, re-enable on return
- ad_connector: /ad-mapping/ page (staff only) — match office employees
  to AD accounts with suggestions by email/login/full name, link/unlink/
  create actions, list of unmatched domain accounts; sidebar nav item
- core: auto-rebuild treenode Directory tree (_path/_depth) after
  import-export imports and post_migrate; "rebuild tree" button in
  DirectoryAdmin and rebuild_directory_tree management command

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 16:48:38 +03:00
lokses 5008ba737f AD integration, Mattermost client rewrite, Equipment brand to Directory
- ad_connector: full Django→AD provisioning via ldap3 — LDAP client,
  sync service (create/update/rename CN/enable-disable), Celery tasks,
  signals (auto-create with panel password, attribute updates, password
  sync, block/unblock), sync_users_to_ad management command
- mattermost_connector: rewrite service on mattermostautodriver/httpx,
  fix bare except in username generation (catch ResourceNotFound),
  format_html args instead of interpolation
- it_manager: Equipment.brand CharField → FK to core.Directory
  (equipment_brand type) with data migration
- add missing employees is_staff migration, add requirements.txt

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-02 16:01:44 +03:00
lokses 131cb27d16 Initial commit — ACORE pharmacy network management system
Django project: employees, locations, visit_manager, it_manager,
mattermost_connector and stub connectors (ad, mail, portal).
2026-05-31 14:21:47 +03:00