diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 51b260773..8b5af54af 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -11,6 +11,12 @@ class ApplicationController < ActionController::Base end end + def get_acter + return User.find params[:user_id] if params[:user_id] + return Group.find params[:group_id] if params[:group_id] + return current_user + end + def authenticate_build_service! if request.remote_ip != APP_CONFIG['build_service_ip'] render :nothing => true, :status => 403