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

GetGraph supports subject relations #355

Merged
merged 1 commit into from
Mar 26, 2024
Merged

GetGraph supports subject relations #355

merged 1 commit into from
Mar 26, 2024

Conversation

ronenh
Copy link
Contributor

@ronenh ronenh commented Mar 26, 2024

With this version of go-edge-ds it is possible to use GetGraph to find objects based on subject relations.

For example, to find all the object of type doc to which members of a group have can_write permission:

ds.graph({
  "object_type": "doc",
  "relation": "can_write",
  "subject_type": "group",
  "subject_id": "group-id",
  "subject_relation": "member"
})

With this version of go-edge-ds it is possible to use GetGraph
to find objects based on subject relations.

For example, to find all the object of type `doc` to which members
of a `group` have `can_write` permission:

```rego
ds.graph({
  "object_type": "doc",
  "relation": "can_write",
  "subject_type": "group",
  "subject_id": "group-id",
  "subject_relation": "member"
})

```
@ronenh ronenh requested a review from gertd March 26, 2024 16:44
Copy link

Pull Request Test Coverage Report for Build 8439719167

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 24.668%

Totals Coverage Status
Change from base Build 8403200358: 0.1%
Covered Lines: 1151
Relevant Lines: 4666

💛 - Coveralls

@gertd gertd merged commit 873ffbc into main Mar 26, 2024
5 checks passed
@gertd gertd deleted the get-graph branch March 26, 2024 17:02
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

Successfully merging this pull request may close these issues.

None yet

2 participants