Skip to content

Add disable personal access tokens to ApplicationSettings

Imre Farkas requested to merge if-384201-disable_pats_to_app_settings into master

What does this MR do and why?

In !97299 (merged), we added the functionality to disable personal access tokens in FIPS mode. This change refactors it by introducing a new ApplicationSettings, independent of FIPS mode.

Related to #384201 (closed).

Migration output

up

$ rake db:migrate:up:main VERSION=20221205061134                                                                                                                        
main: == 20221205061134 AddDisablePatsToApplicationSettings: migrating ==============
main: -- add_column(:application_settings, :disable_personal_access_tokens, :boolean, {:default=>false, :null=>false})
main:    -> 0.0042s
main: == 20221205061134 AddDisablePatsToApplicationSettings: migrated (0.0050s) =====

down

$ rake db:migrate:down:main VERSION=20221205061134                                                                                                                      
main: == 20221205061134 AddDisablePatsToApplicationSettings: reverting ==============
main: -- remove_column(:application_settings, :disable_personal_access_tokens, :boolean, {:default=>false, :null=>false})
main:    -> 0.0048s
main: == 20221205061134 AddDisablePatsToApplicationSettings: reverted (0.0068s) =====

Screenshots or screen recordings

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

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Drew Blessing

Merge request reports