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

ADD function for condition Date comparisons in permission conditions #65

Open
robere2 opened this issue Apr 1, 2024 · 2 comments
Open
Labels
Complexity: HIGH This issue may require in-depth knowledge of module features and require significant testing Module: API This issue pertains to the apps/api module Priority: MED This issue isn't critical or security-related but is holding back other issues or efficiency. Type: Feature New feature or request

Comments

@robere2
Copy link
Member

robere2 commented Apr 1, 2024

Having the ability to offset a datetime (more specifically the $now variable) in permission conditions would allow us to restrict users permissions for only a certain interval of time, e.g., only being able to view Productions less than 7 days before they're scheduled to start.

Possible syntax could look something like:

{
  "startTime": {
    "lt": "ADD($now, 604800)"
  }
}

604,800 is the number of seconds in 7 days.

This should also work with normal datetime strings, but there's not much purpose to doing so:

{
  "startTime": {
    "lt": "ADD('2024-04-01T18:20:31+0000', 604800)"
  }
}
@robere2 robere2 added Priority: MED This issue isn't critical or security-related but is holding back other issues or efficiency. Type: Feature New feature or request Module: API This issue pertains to the apps/api module labels Apr 1, 2024
@robere2
Copy link
Member Author

robere2 commented Apr 1, 2024

Having this ready for Fall 2024 hockey season would be ideal.

@robere2 robere2 added the Complexity: HIGH This issue may require in-depth knowledge of module features and require significant testing label Apr 2, 2024
@robere2
Copy link
Member Author

robere2 commented Apr 2, 2024

First referenced in #11

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: HIGH This issue may require in-depth knowledge of module features and require significant testing Module: API This issue pertains to the apps/api module Priority: MED This issue isn't critical or security-related but is holding back other issues or efficiency. Type: Feature New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant