diff options
author | Marius Mathiesen <marius.mathiesen@gmail.com> | 2009-02-18 15:57:26 +0100 |
---|---|---|
committer | Johan Sørensen <johan@johansorensen.com> | 2009-04-22 15:14:22 +0200 |
commit | 13fbf4ec5cfe976e50a53f3c2a677c7ba20aff69 (patch) | |
tree | 6491c3ce99273c6905cc7d5b1d942930551894c3 /app/controllers/application_controller.rb | |
parent | 45d14d78dbb682bf044848585be76e336b234aac (diff) | |
download | gitorious-mainline-outdated-13fbf4ec5cfe976e50a53f3c2a677c7ba20aff69.zip gitorious-mainline-outdated-13fbf4ec5cfe976e50a53f3c2a677c7ba20aff69.tar.gz gitorious-mainline-outdated-13fbf4ec5cfe976e50a53f3c2a677c7ba20aff69.tar.bz2 |
Adding before_filter that requires the user to accept the current EULA
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r-- | app/controllers/application_controller.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 851c9ba..9cd4dfe 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -52,6 +52,15 @@ class ApplicationController < ActionController::Base end end + def require_current_eula + unless current_user.current_license_agreement_accepted? + store_location + flash[:error] = I18n.t "views.license.terms_not_accepted" + redirect_to account_license_path + return + end + end + def find_repository_owner if params[:project_id] @owner = Project.find_by_slug!(params[:project_id]) |