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

chore: renamed function and reordered parameter #44

Merged
merged 1 commit into from
Oct 22, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions stores/temporal-access/store.fga.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ model: |

type document
relations
define viewer: [user, user with non_expired_grant]
define viewer: [user, user with temporal_access]

condition non_expired_grant(current_time: timestamp, grant_time: timestamp, grant_duration: duration) {
condition temporal_access(grant_time: timestamp, grant_duration: duration, current_time: timestamp) {
current_time < grant_time + grant_duration
}

Expand All @@ -21,7 +21,7 @@ tuples:
relation: viewer
object: document:1
condition:
name: non_expired_grant
name: temporal_access
context:
grant_time : "2023-01-01T00:00:00Z"
grant_duration : 1h
Expand All @@ -30,7 +30,7 @@ tuples:
relation: viewer
object: document:2
condition:
name: non_expired_grant
name: temporal_access
context:
grant_time : "2023-01-01T00:00:00Z"
grant_duration : 5s
Expand Down