admin-audit
/admin-audit
Zapisuje w dzienniku audytu zdarzenie spoza modelu i maskuje dane osobowe, np. NIK, NPWP, telefon, adres lub numer konta.
- Autor
- yuanmaharsyah ↗
- Repozytorium
- admin-boilerplate ↗
- Licencja
- MIT
- Ostatnia zmiana repozytorium
- 08.11.2026
Ocena i bezpieczeństwo
- Pliki w paczce
- 1
- Skrypty
- 0
- Komentarze HTML
- 0
- Adresy URL w SKILL.md
- 0
Brak sygnałów. Repozytorium zmienione 08.11.2026, bez odwołań do wycofanych modeli i API.
MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.
Co robi i kiedy
Zapisuje w dzienniku audytu zdarzenie spoza modelu i maskuje dane osobowe, np. NIK, NPWP, telefon, adres lub numer konta.
Oryginalny opis (EN)
Use when logging a non-model event to the audit log (Log Aktivitas), or when a field holds personal data that must be masked (NIK, NPWP, phone, address, account number).
Jak działa
- Masking personal data
Podgląd SKILL.md
---
name: admin-audit
description: "Use when logging a non-model event to the audit log (Log Aktivitas), or when a field holds personal data that must be masked (NIK, NPWP, phone, address, account number)."
---
# Audit events and masked fields
Model changes are logged automatically by `LogsModuleActivity`. Everything else goes through `Audit::record()`:
```php
Audit::record(AuditEvent::SettingsUpdated, meta: ['keys' => ['app.name']]); // core event
Audit::record('approve', $record, ['note' => $note]); // a custom action declared in module.php
Audit::batch(function () use ($ids) { // many records, one batch
{Name}::query()->whereKey($ids)->each->delete();
});
```
- Never call `activity()` directly, never queue audit writes, never update or delete `activity_log` rows. An undeclared event name throws; standard actions (`view`, `create`…) are not event names.
- A job writes as the user it was dispatched for: `Audit::actingAs($this->user, fn () => Audit::record(AuditEvent::Exported, meta: ['rows' => $count], module: '{slug}'));`
- Audit queries go through `ImmutableActivity::visibleTo($user)`.
## Masking personal data
Add the field to `config/admin-core.php` (if the project has none yet: `php artisan vendor:publish --tag=admin-core-config`) → `admin-core.audit.masked_fields` with `omit` (never stored), `partial` (keeps the first 4 and last 4 characters) or `full` (`••••`), in the same change that adds the field. The contract test (`ContractAssertions::assertMaskingHolds()`) checks every configured field for every event type. Never log passwords, tokens or unmasked personal data.
Wersje
W bazie nie ma innych skilli o nazwie admin-audit.
Migawka bazy z 13.11.2026 · wersja paczki bf3c6203ce3a (skrót SHA-256 całej paczki)
Pobrania w ostatnich 30 dniach: 0 · ranking
Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.
Podobne skille
- 100indonesian-data-forms
Pomaga budować formularze dla użytkowników z Indonezji: walidację NIK i NPWP, adresy administracyjne, numery telefonów i format rupii. - 96admin-customize-core
Zmienia wygląd lub zachowanie podstawowych ekranów panelu administracyjnego, takich jak użytkownicy czy logi, bez edycji kodu dostawcy.