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

directus-extension-module-permissions

v1.0.5

Published

Control Studio UI visibility for the module bar, Module Navigation, Content nav, Users role tree, Sidebar, and Start Page by role and policy

Downloads

689

Readme

Module Permissions

Control what non-admin users see in the Directus Data Studio — the left module bar, middle Module Navigation, Content nav, Users role tree, right sidebar, and where they land after login — based on their roles and policies.

Overview

Directus stores the left module bar as a single project-wide setting. This extension brings back per-role and per-policy visibility, and adds similar controls for other Studio areas that often show more than certain teams should see.

Open Module Permissions from the left bar (admins only). Rules only affect non-admin users. Administrators always see everything and are never redirected by these rules.

Important: Most of these controls change what appears in the interface. They are not a full security lock. Users may still reach data through the API or permissions if those allow it. Use Directus permissions for real access control; use this extension to tidy and simplify the Studio experience.

Features

Modules

Reorder the left module bar, enable or disable entries, add custom links, and hide or show modules for selected roles and policies. Optionally block deep links when a module is hidden. Also hide the middle Module Navigation panel per module for matched roles/policies.

  • Reorder & toggle the left module bar (same idea as Project Settings → Modules)
  • Add custom links to the module bar
  • Hide a module for selected roles/policies, or show it only to those roles/policies
  • Optionally block deep links when a module is hidden (e.g. typing /users in the address bar)
  • Hide Module Navigation — hide the middle navigation column for selected modules when the user matches

Sidebar

Hide individual right-sidebar panels, or force the whole sidebar collapsed or hidden for matched roles and policies.

  • Hide individual right-sidebar panels (Layout Options, Revisions, Comments, Activity Log, and more) for selected roles/policies
  • Force the whole sidebar collapsed (icons only) or fully hidden
  • Purely visual — does not change permissions

Content

Hide collections from the Content navigation while keeping normal permissions for relations and the API.

  • Hide collections from the Content navigation for selected roles/policies
  • Collections stay available in relations and the API if permissions allow
  • Optionally block deep links to hidden collections

Users

Control which roles appear in the Users module’s navigation tree.

  • Own Role Only — matched users only see their own role (and parent roles) in the Users navigation tree
  • Role Visibility — hide or show specific roles in that tree
  • Optionally block deep links to hidden role pages

Start Page

Choose where matched users land after login.

  • Set where matched users land after login (for example /files or /content)
  • Without Force Redirect, a user’s saved last page still wins
  • With Force Redirect, they go to your start page even if they have a last page
  • Explicit shared links with ?redirect= still work as expected

Settings

  • Export / import your Module Permissions config as JSON (backup or move between projects)
  • Remove extension data cleanly before uninstall (only this extension’s settings — not your module bar order)

How rules work

For most visibility options you pick:

  1. Hide for matched roles/policies — those people don’t see it
  2. Show only for matched roles/policies — everyone else doesn’t see it

You can match by role, policy, or both. If either matches, the rule applies.

Some lists (Start Page, Sidebar mode, Own Role Only, Hide Module Navigation) support a catch-all: leave roles and policies empty and place the rule last so it applies to everyone who didn’t match an earlier rule.

Installation

Supports Directus 9, 10, 11 and 12.

npm

npm install directus-extension-module-permissions

Place the package in your Directus extensions folder (or install into a project that loads extensions from node_modules), then restart Directus.

Marketplace

Search for Module Permissions in Settings → Marketplace. This bundle includes an API hook, so some environments only allow App extensions from the Marketplace — use the npm/manual install below if install is blocked.

Manual Installation

  1. Install and build:
cd directus-extension-module-permissions
npm install
npm run build
  1. Copy the built package into your Directus extensions folder (include package.json and the dist folder).

  2. Restart Directus.

  3. In the Data Studio:

    1. Open Settings → Project Settings → Modules
    2. Enable Module Permissions
    3. Open Module Permissions from the left bar

Getting started

  1. Open Module Permissions as an admin.
  2. Start with Modules — reorder the bar and hide modules your Editors or other roles shouldn’t see.
  3. Use Sidebar, Content, and Users to simplify those screens for the same roles.
  4. Set a Start Page if you want a clear landing page after login.
  5. Optionally Export JSON from Settings so you can restore the config later.

Tips

  • Always pair Studio visibility rules with the right permissions in Directus Access Control.
  • Test with a non-admin account (or another browser profile) after saving.
  • Export your config before major changes or before uninstalling.
  • Uninstall cleanup only removes this extension’s data — your normal module bar and other project settings stay intact.

Examples

A focused Insights view: other modules are hidden from the left bar, and the middle Module Navigation column is removed, so the user only sees the dashboard.

Editing a Content item with the right sidebar fully hidden — no collapsed rail and no detail panels — so the form uses the full width.

User Directory for a restricted role: the Users module and its roles tree are not shown in navigation, leaving a simple user detail form without the usual Users chrome.

License

MIT