Domanda

I have a rails site that I'm ready to launch for beta testing and am wondering what the best way to do it is. We currently use FB connect via omniauth to register users but I want to limit registration during our beta to a list of people that have already signed up.

I have review this thread and am not really looking for someone to manage our beta test. I just simply want only approved beta testers to be able to register.

È stato utile?

Soluzione

You could do something really simple and have a HTTP basic auth before-filter:

class ApplicationController < ActionController::Base
  before_filter :beta_protection

  def beta_protection
    return true unless Rails.env.beta?
    authenticate_or_request_with_http_basic do |username, password|
      username == "username" && password == "password"
    end
  end
end

This won't look super great, but you can use this (and give the username and password out to beta users) to add in a simple, easy way to control access to your site.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top