-
-
Notifications
You must be signed in to change notification settings - Fork 1
ADD function for condition Date comparisons in permission conditions #65
Copy link
Copy link
Open
Labels
Complexity: HIGHThis issue may require in-depth knowledge of module features and require significant testingThis issue may require in-depth knowledge of module features and require significant testingModule: APIThis issue pertains to the apps/api moduleThis issue pertains to the apps/api modulePriority: MEDThis issue isn't critical or security-related but is holding back other issues or efficiency.This issue isn't critical or security-related but is holding back other issues or efficiency.Type: FeatureNew feature or requestNew feature or request
Description
Activity
Metadata
Metadata
Assignees
Labels
Complexity: HIGHThis issue may require in-depth knowledge of module features and require significant testingThis issue may require in-depth knowledge of module features and require significant testingModule: APIThis issue pertains to the apps/api moduleThis issue pertains to the apps/api modulePriority: MEDThis issue isn't critical or security-related but is holding back other issues or efficiency.This issue isn't critical or security-related but is holding back other issues or efficiency.Type: FeatureNew feature or requestNew feature or request
Having the ability to offset a datetime (more specifically the
$nowvariable) 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)" } }