You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's no other issue that already describes my problem.
Describe the Bug
Users may have multiple roles: an M2M field other_roles is therefore added to Directus Users in relation with Directus Roles
Here is the full list a Member can see when the Directus Users filter is set to All.
The Manager who is also a Member has 2 roles: the Role Manager Role and an other_roles Member Role.
What I'd like to build is a filter that allows a Member to see any other user that has a Role Member Roleor an other_roles Member Role i.e. with the present data:
Member who has a Member Role in Role
Member 2 who has a Member Role in Role
Manager who's role is Manager Role but has a Member Role in other_roles
First step: showing the users that have a Role Member Role
Below, under the filter (in admin) you see the users list (seen by the member)
Second step: we expect the users that have a Role Member Role or an other_roles Member Role,
that is Member, Member 2 and Manager
Below, under the filter (in admin) you see the users list (seen by the member)
But here, we have only the user itself.
I suspect that Directus cannot resolve properly the M2M here, and therefore, goes to the default minimal filter: the user itself.
On your second image, your filter isn't configured properly: when using a and/or block, its children will be identified by a increased left margin.
Here's how it should look like:
Preflight Checklist
Describe the Bug
Users may have multiple roles: an M2M field
other_roles
is therefore added to Directus Users in relation with Directus RolesHere is the full list a
Member
can see when the Directus Users filter is set to All.The Manager who is also a Member has 2 roles: the Role
Manager Role
and an other_rolesMember Role
.What I'd like to build is a filter that allows a
Member
to see any other user that has a RoleMember Role
or an other_rolesMember Role
i.e. with the present data:Member Role
inRole
Member Role
inRole
Manager Role
but has aMember Role
inother_roles
First step: showing the users that have a Role
Member Role
Below, under the filter (in admin) you see the users list (seen by the member)
Second step: we expect the users that have a Role
Member Role
or an other_rolesMember Role
,that is Member, Member 2 and Manager
Below, under the filter (in admin) you see the users list (seen by the member)
But here, we have only the user itself.
I suspect that Directus cannot resolve properly the M2M here, and therefore, goes to the default minimal filter: the user itself.
To Reproduce
You may use this Database: data.2.zip
Member Role
as described in the First stepMember Role
Member Role
as described in the Second stepErrors Shown
The filter reduces the Users list to the user itself instead of enlarging it to
What version of Directus are you using?
9.4.3
What version of Node.js are you using?
14.17.1
What database are you using?
SQLite version 3.37.0
What browser are you using?
Firefox
What operating system are you using?
Windows_NT 10.0.19043
How are you deploying Directus?
locally
The text was updated successfully, but these errors were encountered: