1
Simpler way to get a user's policies needed
Source: directus/directus#24691 · opened by @stx-chris
Describe the Bug Although technically not a bug, using policies in actual application turns into a cumbersome endeavour. It ought to easy to get the names of all policies assigned to a user, including the ones attached to their role. (Using policy ids instead of names in an app is not a practical approach) If I want to know which policies a user belongs to, I have to execute the following steps: 1. Set up a policy and add Read permission to at least directus_access, directus_policies,directus_users 2. Restrict access to these tables to the user and the user's role respectively 3. Retrieve the user's record including the filters policy.policies.name, role.policies.policy.name to get the actual policy names 4. Merge the policy names from their different levels in the returning user object into a single array to be usable for lookups within an application Can we have a helper function within the SDK, maybe getUserPolicies(user) that returns an array of all policies a…
No pledges yet. Be the first to back this.
Comments
Similar requests
Update User Access Policy from Flows
2 votes · 0 comments
Policy UX Enhancements for collection permissions management
2 votes · 0 comments
Access Policy for Data Model / Content Collection Groups (Folders)
2 votes · 0 comments
Limitations with the assignment of bookmarks
9 votes · 0 comments
Directus as a SSO provider
26 votes · 0 comments
No comments yet.