Skip to content

[Tree View Table Layout] Sorting handles do not appear when logged in as a non-administrator user #164

@martin-danhier

Description

@martin-danhier

Extension

Something else

Describe the Bug

When logged in as a non-admin user (even with full CRUDS access to all tables), the sort handles of the "tree view table" layout don't appear:

Image

When I add "administrator" privileges to that user, the handles correctly show up:

Image

I would expect the handles to show up if the user has access to the "sort" and "parent_id" columns, without requiring administrator privileges.

It is also interesting to note that the sort handles do appear without administrator privileges when using the regular table layout:

Image

To Reproduce

Using an admin user:

  1. Create a pages collection, with UUID id, as well as a sort field.
  2. Add a M2O field named parent_id, pointing to another pages item
  3. Create a page with no parent
  4. Create another page with the previous page as parent
  5. In the Pages list, select the "Tree View Table" layout and set it to use the "Parent ID" field as parent.

The pages show up in a tree view, as expected. Then:

  1. Create an editor role, with a full access policy that has access to the app, full CRUDS access to all tables, but with administrator privileges disabled.
  2. Create a user and give it the editor role.
  3. Log in as that user, open the "Pages" list and setup the "Tree View Table" as before.

The pages appear, but without sorting handles nor indents.

Directus Version

v11.5.1 with @directus-labs/tree-view-table-layout v1.0.1

Hosting Strategy

Self-Hosted (Docker Image)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions