Nerdy Programmers Mingling

    TypeScript icon, indicating that this package has built-in type declarations

    0.1.2 • Public • Published

    PersonaSpace ACL Middleware

    For Node.js server

    CircleCI codecov Known Vulnerabilities JavaScript Style Guide

    A package containing default middleware and handling of middleware for PersonaSpace Node.js servers.

    PersonaSpace uses a powerful ACL implementation that give an owner unparalleled control over which visitors can interact with their data, where visitors can access their data from, and when visitors can access it. @personaspace/server-acl-middleware contains the ACL middleware that can modify an ACL dynamically based on request data, date, time, etc...

    This package provides only the middleware ACLs. The @personaspace/server-acl package handles resolution of ACLs of a visitor's access to the data. The @personaspace/server-resource package handles validation of the visitor's access to the data.


    Install @personaspace/server-acl-middleware using npm.

    npm i @personaspace/server-acl-middleware


    //  "request" is the web request on a PersonaSpace server.
    import { processMiddleware } from "@personaspace/server-acl-middleware";
    import { onDomain } from "@personaspace/server-acl-middleware-ondomain";
    const req = { headers: { host: "" } };
    const permissions = {
      create: {
        enforce: false,
        result: true,
      read: {
        enforce: true,
        result: false,
    const permObjs = [
        enforce: true,
        middleware: "onDomain",
        params: [""],
        result: false,
        enforce: false,
        result: true,
    processMiddleware(req, "create", permissions, permObjs, [onDomain]);


    Documentation is located at For issues with the documentation, please Create a new issue.

    Contributing to PersonaSpace

    PersonaSpace is a large project and contributors are welcome. Thank you for your support and efforts!

    There are a lot of ways to contribute:

    Be sure to look at


    PersonaSpace is licensed under the MIT License.


    npm i @personaspace/server-acl-middleware

    DownloadsWeekly Downloads






    Unpacked Size

    19.5 kB

    Total Files


    Last publish


    • bntly