rilrom

audit fields

by rilrom
payload-bites
Logging & monitoring
v3
^3
MIT

Overview

Summary generated from the README

This plugin adds createdBy and lastModifiedBy fields to collections and globals so editors can see who created or last changed a document. It is registered in the plugins array of the Payload config through the auditFieldsPlugin function. It targets Payload 3.

Features

  • Adds a createdBy field to collections and globals
  • Adds a lastModifiedBy field to collections and globals
  • Configurable through plugin options
  • Registers through the Payload config plugins array

Use cases

  • Track which user created or last edited a document in a collection
  • Record authorship on globals such as site settings

From the author

add createdBy and lastModifiedBy fields to collections and globals

Installation

npm i @payload-bites/audit-fields

114

Stars

6

Forks

0

Open Issues

3 weeks ago

Last Updated

0

Weekly Downloads

v1.7.0

npm Version

42.3 KB

Unpacked Size

0

Dependencies

Repository stars

Trends appear after 7 days of data. Daily snapshots have not started yet.

Shared by 7 plugins in rilrom/payload-bites.

npm weekly downloads

Trends appear after 7 days of data. Daily snapshots have not started yet.

Each point is npm's rolling 7-day download count.

Health Score

68/100Good

Composite score based on GitHub activity, stars, npm downloads, publish recency, dependency count, and package size.

Badge for your README

Payload Directory health badge
Markdown
[![Payload Directory](https://payloaddirectory.dev/badge/908347705-audit-fields.svg)](https://payloaddirectory.dev/plugins/908347705-audit-fields)
HTML
<a href="https://payloaddirectory.dev/plugins/908347705-audit-fields"><img src="https://payloaddirectory.dev/badge/908347705-audit-fields.svg" alt="Payload Directory"></a>
Updated Sep 27, 2026Created Dec 25, 2024Published Jul 15, 2026

README

Audit fields

Add createdBy and lastModifiedBy audit fields to collections and globals.

Quick start

  1. Install the plugin:
pnpm add @payload-bites/audit-fields
  1. Add the plugin to your payload.config.ts:
/// ....
import { auditFieldsPlugin } from "@payload-bites/audit-fields";

export default buildConfig({
  // ...
  plugins: [
    // ...
    auditFieldsPlugin({
      // ...
    }),
  ],
});

Defaults

For defaults, refer to defaults.ts.

Options

For options, refer to types.ts.

Similar plugins