Skip to content
0

katanakit-js / WpRoleAuditSchema

Variable: WpRoleAuditSchema ​

ts
const WpRoleAuditSchema: ZodObject<{
  declared: ZodArray<ZodString>;
  granted: ZodArray<ZodString>;
  holders: ZodNumber;
  missing: ZodArray<ZodString>;
  slug: ZodString;
  status: ZodEnum<{
     partial: "partial";
     unverifiable: "unverifiable";
     verified: "verified";
  }>;
  undeclared: ZodArray<ZodString>;
}, $strip>;

Defined in: src/schemas/wordpress.schema.ts:512

The result of auditing a declared role against what WordPress reports for the users that hold it.

granted is the intersection across holders, not the union: a capability only one holder has is not a capability the role grants, and treating it as one is how a "verified" badge ends up hiding a hole.

Released under the MIT License.