npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@adobedjangir/commerce-admin-ims-access

v1.0.10

Published

Email-based RBAC add-on for @adobedjangir/commerce-admin-management. Assign admin/editor/viewer roles by email via a UI (super-admins in .env), with server-side enforcement of config saves, schema edits, audit reverts, and snapshot ops.

Readme

@adobedjangir/commerce-admin-ims-access

Role-based access control (RBAC) add-on for @adobedjangir/commerce-admin-management.

Adds email-based roles (admin / editor / viewer), a UI to manage them, a role badge in the nav, a My Access page, and server-side enforcement of writes across the whole suite.

Without this add-on, the core app is open (everyone is effectively admin). Installing it turns on RBAC.


What it adds

| Piece | Where | |---|---| | Access Management page | System nav — add an email, assign a role, list/remove (admin-only) | | My Access page | System nav — shows your resolved role + identity | | Role badge | Top-right nav chip with a details popover | | ims-user-profile action | Resolves the caller's identity + effective role | | access-list / access-save / access-delete actions | CRUD for email→role assignments (admin-gated) | | RBAC hook (./hook) | Core & other add-ons call it to enforce roles server-side |

How a role is resolved

For the caller's IMS email (read from their forwarded token):

  1. email ∈ SUPER_ADMIN_EMAILS (.env) → admin (bootstrap; can't be locked out)
  2. email ∈ stored assignment (ABDB, managed in Access Management) → that role
  3. otherwise → viewer (least privilege)

What each role can do (enforced server-side + UI)

| Action | viewer | editor | admin | |---|:--:|:--:|:--:| | View config / audit / snapshots | ✅ | ✅ | ✅ | | Save config values | ❌ | ✅ | ✅ | | Edit schema (Schema Designer) | ❌ | ❌ | ✅ | | Revert an audit entry | ❌ | ❌ | ✅ | | Create / restore snapshots | ❌ | ❌ | ✅ | | Manage access (this add-on) | ❌ | ❌ | ✅ |

Enforcement is fail-open only when the role genuinely can't be resolved (transient IMS/ABDB error) so a hiccup can't lock everyone out; when the role resolves, it is strictly enforced.


Install

npm install @adobedjangir/commerce-admin-ims-access
aio app deploy

npm install auto-registers the add-on (nav + pages + action keys) via the core package's discovery mechanism — no manual setup step. aio app deploy is required after install so the core actions rebuild and bundle this add-on's RBAC hook (the enforcement is compiled into the actions at deploy time).

Configure

Add the bootstrap super-admin(s) to your project .env (comma-separated):

[email protected],[email protected]

Everyone else defaults to viewer until an admin assigns them a role in the Access Management page.

Usage in host code (optional)

import { useUserRole, hasRole, RoleBadge } from '@adobedjangir/commerce-admin-ims-access/web'

const { role } = useUserRole(props)      // 'admin' | 'editor' | 'viewer'
if (hasRole(role, 'editor')) { /* … */ } // rank-aware check

Server-side, other actions gate themselves through the hook:

let rbac = null
try { rbac = require('@adobedjangir/commerce-admin-ims-access/hook') } catch (_) {}
// ...
if (rbac) {
  const err = await rbac.assertMinRole(params, 'admin') // null when allowed
  if (err) return { statusCode: 403, body: { error: err } }
}

Notes

  • Roles map to emails, not IMS groups — no ROLE_MAP_* configuration needed.
  • The access-* actions verify the caller is an admin server-side, so a viewer/editor can't grant themselves a higher role by calling the API directly.
  • Super-admins (.env) appear in Access Management as locked (read-only).

License

Apache-2.0