Convert token_expiry_notify_inherited to cascading setting

What does this MR do and why?

Convert token_expiry_notify_inherited to cascading setting

The token_expiry_notify_inherited column is still behind a feature flag and is not being used. However, to bring it in line with cascading namespace settings, we would have to change the column default from true to nil , and migrate all existing true values to nil . Since namespace_settings is a large table, this takes substantial effort.

Instead, we add new columns, and add the legacy token_expiry_notify_inherited to ignored_columns so it can be removed in the next release.

  • Converts token_expiry_notify_inherited setting to resource_access_token_notify_inherited
  • Adds lock_resource_access_token_notify_inherited namespace setting
  • Adds application settings with mirrored names using the transactional_emails jsonb column
  • Ignores column token_expiry_notify_inherited
  • Updates views and specs to use the new column names

Changelog: changed

References

Please include cross links to any resources that are relevant to this MR This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

Part 3 of 4 MRs for this feature

  1. Instance-wide setting
  2. Group setting
  3. This MR - changing the defaults introduced by those MRs and converting to cascading_namespace_setting due to further discussion on the issue
  4. Implementation of new notification code - likely similar to code broken out from this MR

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After
Screenshot_2024-10-07_at_12.50.39_PM Screenshot_2024-11-13_at_11.00.59_AM
Screenshot_2024-11-05_at_12.00.51_PM Screenshot_2024-11-13_at_11.01.46_AM
Screenshot_2024-10-04_at_10.57.53_AM Screenshot_2024-11-13_at_12.18.39_AM

How to set up and validate locally

  1. Enable the feature Feature.enable :pat_expiry_inherited_members_notification
  2. Visit application email settings: https://gdk.test:3443/admin/application_settings/preferences#js-email-settings
  3. Check group settings: https://gdk.test:3443/groups/flightjs/-/edit
  4. Check "Enforce for all subgroups"
  5. Create a new subgroup
  6. Attempt to edit the setting for the subgroup

Related to #463016 (closed)

Edited by Andrew Evans

Merge request reports

Loading