Skip to content

Commit

Permalink
Put very rough prototype pages behind feature flag
Browse files Browse the repository at this point in the history
  • Loading branch information
mlandauer committed Mar 20, 2024
1 parent 6306b60 commit a809cff
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 4 deletions.
6 changes: 5 additions & 1 deletion app/controllers/api_keys/non_commercials_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ class NonCommercialsController < ApplicationController
extend T::Sig

sig { void }
def new; end
def new
unless Flipper.enabled?(:request_api_keys, current_user)
raise ActiveRecord::RecordNotFound
end
end
end
end
6 changes: 5 additions & 1 deletion app/controllers/api_keys/paid_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ class PaidController < ApplicationController
extend T::Sig

sig { void }
def new; end
def new
unless Flipper.enabled?(:request_api_keys, current_user)
raise ActiveRecord::RecordNotFound
end
end
end
end
8 changes: 7 additions & 1 deletion app/controllers/api_keys/requests_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,13 @@ module ApiKeys
class RequestsController < ApplicationController
extend T::Sig

# TODO: Need to be logged in to use this page

sig { void }
def new; end
def new
unless Flipper.enabled?(:request_api_keys, current_user)
raise ActiveRecord::RecordNotFound
end
end
end
end
3 changes: 2 additions & 1 deletion config/initializers/flipper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
# You must also disable writes to the database by creating a database user with read-only privileges and using that
"maintenance_mode" => "Put a banner across the site and give helpful message to the user if trying to write to the database",
"full_text_search" => "Allow searching for all applications containing the word 'tree', for example",
"view_application_versions" => "Can view the update history of an application"
"view_application_versions" => "Can view the update history of an application",
"request_api_keys" => "Allow a new experimental flow for requesting API keys. Only works with tailwind theme."
}
end

Expand Down

0 comments on commit a809cff

Please sign in to comment.