Scan your whole stack
From OX Research Newsroom
Are you using @extantape/payload-plugin-organizations?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.3.0
@extantape/payload-plugin-organizations was last scanned on 28 Nov 2026 at version 0.3.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.3.0 LATEST | 28 Nov 2026 | No rules fired |
| 0.2.0 | 25 Nov 2026 | No rules fired |
Findings for v0.3.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.3.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
Organizations for Payload: places people work or belong, with Coordinator, Member and Viewer levels, pending organizations a host approves, a shipped list of public mail domains, and a picker field. Access rules are the host's.
Status: early (0.x) and on npm. It is tested against real Payload 3.92 with an in-memory MongoDB replica set (211 tests, including two requests at once, a withdraw racing an accept, a database without transactions, and refusals over REST, GraphQL and bulk update). The tests don't cover a live site, the admin screens have not been checked in a browser, and the ROR and domain data are entered by hand: nothing here calls ROR. It needs a database that supports transactions (a MongoDB replica set), because the last-Coordinator rule and the history rows rely on them. At start-up the plugin opens and rolls back one transaction, and refuses to run if the database hands none back, as db-mongodb does with transactionOptions: false. The same check runs on every write the plugin guards, so if the database stops handing out transactions later, or server code passes disableTransaction, the change is refused and nothing is written. allowWithoutTransactions: true turns both checks off, at your own risk. The option must be exactly true or false, or left out; any other value (a string, 1, null) stops the plugin from starting with an error, so a typo can't switch the guard off or leave it on unnoticed.
Three collections.
organizations: a name, a kind you define (zoo, lab, business and so on), a status of pending, active or closed, an optional ROR id, a list of email domains and private notes for staff.organization-members: who is in which organization, at which level (Coordinator, Member or Viewer), with a status of invited, active or removed.organization-events: an append-only history of every change. Nothing edits or deletes it.Rules the plugin enforces itself, for server code as well as for clients:
canChangeLevel allows can withdraw it. Server code with no signed-in user still promotes at once and sees the veto's reason.co.uk and github.io, can't be put on an organization. The suffix check uses the Public Suffix List through the tldts package. A domain already on an organization stays even if you later add it to genericDomains; only added domains are checked.zoo.org is listed, mail.zoo.org and a.b.zoo.org match it. List only domains whose whole name space belongs to the organization.accept, or approve in a pending organization, at the invited level), with preview: true. For anyone else, the invitation row and the organization are left out of what they read, and any membership row that does go back to them comes without its organization, inviter and remover. They can still decline, and the answer carries no document (see the next rule). The tests cover find, findByID and count, filters and sorting on those fields, select, populated relationships at depth 0 to 2, a host document pointing at the organization, the picker, REST, GraphQL, levelIn and organizationsOf, and their own writes to the row (a change that changes nothing, declining, and a change to a declined or withdrawn invitation) over the Local API and REST at depth 0 and 1 and over GraphQL. A refusal, a throw, any answer but null or nothing, or no answer within two seconds hides them. The veto is still asked for real at accept, and the inviter's side doesn't change, so an inviter still can't tell which accounts it covers. Coordinators, active members and staff see what they did before.canUpdate or canRemove, give those people read access too (canRead does this), or they are refused. The same goes for your approvers: approving, activating, closing, reopening and changing the ROR id or domains are updates, so canApprove alone isn't enough (in 0.2.0 it didn't take read access). If you replace or wrap a read rule, updates need both yours and the plugin's to allow the row.status: 'removed' to decline, or status: 'active' to accept (your veto still decides), with no other field. If the write goes through, it answers with no document: the Local API returns null, REST returns doc: null and GraphQL returns null. The same applies to server code that passes them as user, even with access checks off. If you replace or wrap the membership read rule, the exception is off, and that person can neither accept nor decline through an access-checked update.Everything else is the host's call, and every host hook fails closed: only an exact true allows. With no hooks, nobody can do anything.
npm install @extantape/payload-plugin-organizations
import { organizations, organizationField } from '@extantape/payload-plugin-organizations'
export default buildConfig({
plugins: [
organizations({
kinds: [{ value: 'zoo' }, { value: 'lab' }, { value: 'university' }],
rorRequiredKinds: ['university'],
genericDomains: ['*.my-isp.example'],
canCreate: ({ user }) => user.verified === true,
canApprove: ({ user }) => user.role === 'staff',
canUpdate: ({ user, actorLevel }) => user.role === 'staff' || actorLevel === 'coordinator',
canInvite: ({ user, actorLevel }) => user.role === 'staff' || actorLevel === 'coordinator',
canChangeLevel: ({ user, actorLevel }) => user.role === 'staff' || actorLevel === 'coordinator',
canSeePrivate: ({ user }) => user.role === 'staff',
canRead: ({ user }) => user.role === 'staff',
refuseMember: ({ subject }) => (subject.minor ? 'Not available for this account.' : null),
}),
],
collections: [{ slug: 'animals', fields: [organizationField({ name: 'owner' })] }],
})
kinds: the kinds of organization. With none, none can be made.
canCreate: who may propose an organization. canPrecreate: who may make one with nobody in it, to be claimed later (default nobody).
canUpdate: who may rename it or change its private notes. canApprove: who may approve, close or reopen it, change its ROR id or domains, and activate a person in a pending organization.
canInvite, canChangeLevel and canRemove (default: canChangeLevel): who may add, change or remove people. Each gets the organization, the membership, the id and data of the change and actorLevel, the asker's own level there. Anyone can leave for themselves, and a person accepts their own invitation.
refuseMember: required. A veto asked on every acceptance, approval, accepted promotion and reopening, and by matchOrganizations, even from server code. It is not asked when one user invites another, so an inviter sees the same answer for every account and can't tell which ones the veto covers; the person is refused when they accept, and the row stays invited. A promotion is only offered by whoever makes it, so the veto never answers them; it runs when the person accepts the offer (action change-level), and a refused person gets the reason while the offer stays pending. The promoter sees the same pending offer whether the person has not answered or was refused, and can still see that an offer stays pending a long time. A demotion takes effect at once and the veto is not asked. Server code with no user promotes at once and sees the reason. A level can't be changed on a row that is still invited (invite again), because the veto would answer. It is asked at invitation only for server code and for someone inviting themselves, such as the maker of an organization, where nobody else can read the answer. Return null to go ahead, or a reason to refuse. Anything else refuses with a general message. It must be a function, or exactly false to say plainly that you have no veto; null, 0, an empty string and true throw when the plugin is set up. A host keeps minors out of every organization with it. An approver activating a person sees the reason too, so the host's approvers are people you trust with it.
The veto is also asked, with preview: true, when an invited person reads their invitations. It must give the same answer it would give at accept. preview only tells it to skip side effects, such as writing or logging. A veto that returns early with null or nothing when preview is true tells the plugin to show the details, so people it refuses at accept would see the organization and who invited them. Keep it quick: no answer within two seconds counts as a refusal. Hosts on 0.2.0 whose veto has no side effects change nothing. For example:
refuseMember: async ({ subject, preview }) => {
const reason = subject.minor ? 'Not available for this account.' : null
if (reason && !preview) await logRefusal(subject.id) // side effects only when it counts
return reason // the same answer either way
},
Warning: the reason is shown to whoever was refused. Don't write a reason that gives away something private, such as an age. Return a general one like Not available for this account.
canSeePrivate: who reads or writes private notes. Default nobody, so members never see them.
canRead: who reads every organization, membership and history row, such as staff. Everyone else sees their own organizations. A member sees the Coordinators and their own row. A Coordinator sees everyone in theirs and reads its history.
rorRequiredKinds: kinds that match people by domain only once they have a ROR id. Put universities here.
genericDomains: more domains for the shipped list. An entry starting with *. covers everything under it.
allowWithoutTransactions: default false. Only exactly true or false is accepted. See the status note.
audit: before and after hooks for every event. A before hook that throws stops the change.
users: the users collection, default users. A person from any other sign-in collection counts as nobody.
levelIn(req, organizationId): the highest level the signed-in user holds in an active organization, or null.organizationsOf(req, { atLeast? }): the active organizations they are in, with levels.organizationField({ name?, hasMany?, kinds?, required? }): a picker for host collections. It offers only active organizations, and the server refuses a newly chosen pending, closed, unreadable or wrong-kind one. The editor's own read access applies, so someone can't attach an organization they can't see, and every refusal reads the same. Server code that skips access skips this check too. One chosen earlier stays even after it closes.matchOrganizations(payloadOrReq, user, { assumeVerified? }): the active organizations a user's address suggests, by its domain or a parent domain. It is a hint. It never adds anyone, it reads without access rules, and it has no route, so show the result only to the person it is about. It reads the user again from the database, so pass only the id. It returns nothing until the user's _verified is true (or you pass assumeVerified: true because you checked the address another way), and it runs your veto itself (action suggest), dropping any organization the veto refuses. Payload 3.92 doesn't clear _verified when a user changes their email, so reset it yourself in that case.GENERIC_DOMAINS, isGenericDomain, isPublicSuffix, normalizeDomain, domainOf and normalizeRor.levelIn and organizationsOf throw on a read error. Wrap them in your own access functions so an error means no.
lockDocuments: false), so the admin screens don't warn when two people edit the same organization or membership at once. The plugin's own checks still stop two changes at once from breaking its rules.npm install
npm test
npm run build
MIT. Copyright (c) 2026 EXTANT APE. See LICENSE.
Contributions arrive as pull requests from co/ branches in this repo. Only the owner merges.
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.