Skip to content

Conversation

@jonathanhle
Copy link
Contributor

We'd like customize the selectable time durations--including having a different default duration--when creating an Access Request.

Updated README with new REACT_APP Environment Vars introduced:

**Environment Default Overrides:**

- `UNTIL_ID_TO_LABELS_OVERRIDE`: Allows overriding the default ID to labels mapping. **Example:** `'{"14400":"4 Hours","43200":"12 Hours","432000":"5 Days","1209600":"Two Weeks","2592000":"30 Days","7776000":"90 Days"}'`.
- `UNTIL_JUST_NUMERIC_ID_TO_LABELS_OVERRIDE`: Allows overriding the default numeric ID to labels mapping. **Example:** `'{"14400":"4 Hours","43200":"12 Hours","432000":"5 Days","1209600":"Two Weeks","2592000":"30 Days","7776000":"90 Days"}'`.
- `DEFAULT_ACCESS_TIME_OVERRIDE`: Allows overriding the default access time. **Example:** `43200` (in seconds).

Defaults for these overrides can be found in the `src/env-overrides.tsx` file.

Credit to @Jui1337 who worked on the initial logic for this during her Internship on our team, but didn't manage to get this upstream yet.

I believe we've respected the current settings by setting them as the defaults in src/env-overrides.tsx.

Let me know if you'd like any changes / if this can be accepted upstream.

@jonathanhle
Copy link
Contributor Author

closing this PR in lieu of #212

@jonathanhle jonathanhle deleted the jb-access-duration-changes branch March 19, 2025 17:57
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.

1 participant