Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Given an entity, add the ability to search for all entities that it has a grant to #2709

Open
mooreds opened this issue Apr 10, 2024 · 0 comments

Comments

@mooreds
Copy link
Collaborator

mooreds commented Apr 10, 2024

Given an entity, add the ability to search for all entities that it has a grant to

Problem

Given an entity, we have the ability to find all entities or users that have grants to it.

It would be great to be able to find all the entities that it has a grant to. This would allow for easy bidirectional modeling.

Consider a doctor and a patient. We want to be able to find all the doctor's patients and all the patient's doctors. Right now, if we have granted 'is_provider' from the doctor to the patient and we have the patient, we can find the doctor. But we can't see all the patients that the doctor has been granted 'is_provider' to. That is not a query we can run.

Solution

Add a way to search that takes an entityId and returns all of the entities that it has grants to.

Alternatives/workarounds

Create two sets of grants, one down the tree and one up the tree. In the doctor/patient case above, create a 'patient_of' permission and grant it to the doctor from the patient entity.

Additional context

Came up when modelling permissions for a possible customer.

Community guidelines

All issues filed in this repository must abide by the FusionAuth community guidelines.

How to vote

Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant