Role-based visibility for Bookmarks or Folder

Hi community :waving_hand:

I’m trying to make Bookmarks / Presets / Views visible only to a specific group of users (based on role or policy), but I’m running into permission issues.

What I want

I want users with Role X to see only the bookmarks intended for Role X, and not bookmarks created for other roles.


Sample setup

  • Role: role_x
  • Policy: policy_role_x
  • Collection (Folder): folder_role_x
  • Users: Assigned to role_x

What I tried

:one: Using Bookmarks settings

I went to:

Settings → Bookmarks

and created a bookmark with:

collection = folder_role_x

However:

  • When I log in as a user with role_x, the folder folder_role_x does not appear at all. But it works with admin account. So for me it was a lack of permissions :down_arrow: :

:two: Creating permissions via API

Since Data Studio doesn’t show folders inside policies/permissions, I tried creating permissions manually via the API:

{
  "collection": "folder_role_x",
  "action": "read",
  "policy": "policy_role_x"
}

Result:

  • The user now sees the folder and its bookmarks
  • BUT when clicking a bookmark, I get this error:
You don't have permission to access collection "folder_role_x" or it does not exist. Queried in root.

I also have this error using admin account.


Problem / Confusion

  • Bookmarks are visible, but cannot be accessed

  • It’s unclear whether:

    • Folders are meant to be permissioned directly
    • Bookmarks respect collection permissions
    • Or if bookmarks are not designed to be role/policy-specific

My questions

  1. Is it possible to restrict folder to specific roles or policies?
  2. Is using a collection as a folder the correct approach?
  3. Are there additional permissions required for bookmarks to work when scoped by role?
  4. Is there a recommended pattern for role-based bookmarks in Directus?

If this is not currently supported, it would be great to know the intended or future approach. I can create or use custom extensions if necessary.

Thanks in advance for any guidance :folded_hands:

Collection folders are presentation construct only and do not support permissions currently. You will need to remove the policy permission you injected via the api to stop the errors you are seeing. If a user doesn’t have access to any of the collections within a folder the folder is excluded from the content sidebar.

Bookmarks assigned to a role should only be accessible by users in that role and the administrators.

Hope this helps.

Thank you very much for taking the time to respond.
It’s also not possible to place a bookmark in a folder different from the collection it belongs to?
At the moment, the bookmark only appears within its associated collection.


Example

Instead of this :

* Contact (collection)
----My contacts (bookmark)

This :

* Contact (collection)
* My custom folder (folder)
----My contacts (bookmark)