feat: replace deprecated before_filter with before_action
This commit is contained in:
parent
34b4604c7a
commit
dd64ee5159
45 changed files with 54 additions and 54 deletions
|
@ -1,7 +1,7 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class ActivitiesController < ApplicationController
|
class ActivitiesController < ApplicationController
|
||||||
|
|
||||||
before_filter :authenticate_user!, only: [:create]
|
before_action :authenticate_user!, only: [:create]
|
||||||
|
|
||||||
def create
|
def create
|
||||||
json_saved Activity.create(params[:activity])
|
json_saved Activity.create(params[:activity])
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class ApplicationController < ActionController::Base
|
class ApplicationController < ActionController::Base
|
||||||
before_filter :set_locale, :redirect_to_maintenance
|
before_action :set_locale, :redirect_to_maintenance
|
||||||
|
|
||||||
protect_from_forgery
|
protect_from_forgery
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class AwsPresignedPostsController < ApplicationController
|
class AwsPresignedPostsController < ApplicationController
|
||||||
before_filter :authenticate_user!
|
before_action :authenticate_user!
|
||||||
|
|
||||||
# post /presigned_posts
|
# post /presigned_posts
|
||||||
# Create some keys using the AWS gem so the user can do direct-to-S3 uploads
|
# Create some keys using the AWS gem so the user can do direct-to-S3 uploads
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
class BillingSubscriptionsController < ApplicationController
|
class BillingSubscriptionsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_admin!
|
before_action :authenticate_nonprofit_admin!
|
||||||
|
|
||||||
def create_trial
|
def create_trial
|
||||||
render JsonResp.new(params){|params|
|
render JsonResp.new(params){|params|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
class CampaignGiftOptionsController < ApplicationController
|
class CampaignGiftOptionsController < ApplicationController
|
||||||
include Controllers::CampaignHelper
|
include Controllers::CampaignHelper
|
||||||
|
|
||||||
before_filter :authenticate_campaign_editor!, only: [:create, :destroy, :update, :update_order]
|
before_action :authenticate_campaign_editor!, only: [:create, :destroy, :update, :update_order]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@gift_options = current_campaign.campaign_gift_options.order('"order", amount_recurring, amount_one_time')
|
@gift_options = current_campaign.campaign_gift_options.order('"order", amount_recurring, amount_one_time')
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
module Campaigns; class CampaignGiftOptionsController < ApplicationController
|
module Campaigns; class CampaignGiftOptionsController < ApplicationController
|
||||||
include Controllers::CampaignHelper
|
include Controllers::CampaignHelper
|
||||||
|
|
||||||
before_filter :authenticate_campaign_editor!, only: [:create, :destroy, :update, :update_order, :report]
|
before_action :authenticate_campaign_editor!, only: [:create, :destroy, :update, :update_order, :report]
|
||||||
|
|
||||||
def report
|
def report
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Campaigns
|
||||||
class DonationsController < ApplicationController
|
class DonationsController < ApplicationController
|
||||||
include Controllers::CampaignHelper
|
include Controllers::CampaignHelper
|
||||||
|
|
||||||
before_filter :authenticate_campaign_editor!, only: [:index]
|
before_action :authenticate_campaign_editor!, only: [:index]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Campaigns
|
||||||
class SupportersController < ApplicationController
|
class SupportersController < ApplicationController
|
||||||
include Controllers::CampaignHelper
|
include Controllers::CampaignHelper
|
||||||
|
|
||||||
before_filter :authenticate_campaign_editor!, only: [:index]
|
before_action :authenticate_campaign_editor!, only: [:index]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@panels_layout = true
|
@panels_layout = true
|
||||||
|
|
|
@ -3,9 +3,9 @@ class CampaignsController < ApplicationController
|
||||||
include Controllers::CampaignHelper
|
include Controllers::CampaignHelper
|
||||||
|
|
||||||
helper_method :current_campaign_editor?
|
helper_method :current_campaign_editor?
|
||||||
before_filter :authenticate_confirmed_user!, only: [:create, :name_and_id, :duplicate]
|
before_action :authenticate_confirmed_user!, only: [:create, :name_and_id, :duplicate]
|
||||||
before_filter :authenticate_campaign_editor!, only: [:update, :soft_delete]
|
before_action :authenticate_campaign_editor!, only: [:update, :soft_delete]
|
||||||
before_filter :check_nonprofit_status, only: [:index, :show]
|
before_action :check_nonprofit_status, only: [:index, :show]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@nonprofit = current_nonprofit
|
@nonprofit = current_nonprofit
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class CardsController < ApplicationController
|
class CardsController < ApplicationController
|
||||||
|
|
||||||
before_filter :authenticate_user!, :except => [:create]
|
before_action :authenticate_user!, :except => [:create]
|
||||||
|
|
||||||
# post /cards
|
# post /cards
|
||||||
def create
|
def create
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class EmailSettingsController < ApplicationController
|
class EmailSettingsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
user = current_role?(:super_admin) ? User.find(params[:user_id]) : current_user
|
user = current_role?(:super_admin) ? User.find(params[:user_id]) : current_user
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class EmailsController < ApplicationController
|
class EmailsController < ApplicationController
|
||||||
before_filter :authenticate_user!
|
before_action :authenticate_user!
|
||||||
|
|
||||||
def create
|
def create
|
||||||
email = params[:email]
|
email = params[:email]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class EventDiscountsController < ApplicationController
|
class EventDiscountsController < ApplicationController
|
||||||
include Controllers::EventHelper
|
include Controllers::EventHelper
|
||||||
before_filter :authenticate_event_editor!, :except => [:index]
|
before_action :authenticate_event_editor!, :except => [:index]
|
||||||
|
|
||||||
def create
|
def create
|
||||||
params[:event_discount][:event_id] = current_event.id
|
params[:event_discount][:event_id] = current_event.id
|
||||||
|
|
|
@ -3,8 +3,8 @@ class EventsController < ApplicationController
|
||||||
include Controllers::EventHelper
|
include Controllers::EventHelper
|
||||||
|
|
||||||
helper_method :current_event_editor?
|
helper_method :current_event_editor?
|
||||||
before_filter :authenticate_nonprofit_user!, only: :name_and_id
|
before_action :authenticate_nonprofit_user!, only: :name_and_id
|
||||||
before_filter :authenticate_event_editor!, only: [:update, :soft_delete, :stats, :create, :duplicate]
|
before_action :authenticate_event_editor!, only: [:update, :soft_delete, :stats, :create, :duplicate]
|
||||||
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
class ImageAttachmentsController < ApplicationController
|
class ImageAttachmentsController < ApplicationController
|
||||||
before_filter :authenticate_confirmed_user!
|
before_action :authenticate_confirmed_user!
|
||||||
def create
|
def create
|
||||||
# must return json with a link attr
|
# must return json with a link attr
|
||||||
# http://editor.froala.com/server-integrations/php-image-upload
|
# http://editor.froala.com/server-integrations/php-image-upload
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
class MapsController < ApplicationController
|
class MapsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_super_associate!, only: :all_supporters
|
before_action :authenticate_super_associate!, only: :all_supporters
|
||||||
before_filter :authenticate_nonprofit_user!, only: [:all_npo_supporters, :specific_npo_supporters]
|
before_action :authenticate_nonprofit_user!, only: [:all_npo_supporters, :specific_npo_supporters]
|
||||||
|
|
||||||
# used on admin/nonprofits_map and front page
|
# used on admin/nonprofits_map and front page
|
||||||
def all_npos
|
def all_npos
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class ActivitiesController < ApplicationController
|
class ActivitiesController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
# get /nonprofits/:nonprofit_id/supporters/:supporter_id/activities
|
# get /nonprofits/:nonprofit_id/supporters/:supporter_id/activities
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Nonprofits
|
||||||
class BankAccountsController < ApplicationController
|
class BankAccountsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_admin!
|
before_action :authenticate_nonprofit_admin!
|
||||||
|
|
||||||
# post /nonprofits/:nonprofit_id/bank_account
|
# post /nonprofits/:nonprofit_id/bank_account
|
||||||
# must pass in the user's password as params[:password]
|
# must pass in the user's password as params[:password]
|
||||||
|
|
|
@ -4,7 +4,7 @@ class ButtonController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
|
|
||||||
before_filter :authenticate_user!
|
before_action :authenticate_user!
|
||||||
|
|
||||||
|
|
||||||
def send_code
|
def send_code
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Nonprofits
|
||||||
class CardsController < ApplicationController
|
class CardsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def edit
|
def edit
|
||||||
@nonprofit = current_nonprofit
|
@nonprofit = current_nonprofit
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Nonprofits
|
||||||
class ChargesController < ApplicationController
|
class ChargesController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!, only: :index
|
before_action :authenticate_nonprofit_user!, only: :index
|
||||||
|
|
||||||
# get /nonprofit/:nonprofit_id/charges
|
# get /nonprofit/:nonprofit_id/charges
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Nonprofits
|
||||||
class CustomFieldJoinsController < ApplicationController
|
class CustomFieldJoinsController < ApplicationController
|
||||||
|
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@custom_field_joins = current_nonprofit
|
@custom_field_joins = current_nonprofit
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class CustomFieldMastersController < ApplicationController
|
class CustomFieldMastersController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@custom_field_masters = current_nonprofit
|
@custom_field_masters = current_nonprofit
|
||||||
|
|
|
@ -3,8 +3,8 @@ module Nonprofits
|
||||||
class DonationsController < ApplicationController
|
class DonationsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!, only: [:index, :update]
|
before_action :authenticate_nonprofit_user!, only: [:index, :update]
|
||||||
before_filter :authenticate_campaign_editor!, only: [:create_offsite]
|
before_action :authenticate_campaign_editor!, only: [:create_offsite]
|
||||||
|
|
||||||
# get /nonprofit/:nonprofit_id/donations
|
# get /nonprofit/:nonprofit_id/donations
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Nonprofits
|
||||||
class EmailListsController < ApplicationController
|
class EmailListsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
render_json{ Qx.fetch(:email_lists, nonprofit_id: params[:nonprofit_id]) }
|
render_json{ Qx.fetch(:email_lists, nonprofit_id: params[:nonprofit_id]) }
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Nonprofits
|
||||||
class ImportsController < ApplicationController
|
class ImportsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
# post /nonprofits/:nonprofit_id/imports
|
# post /nonprofits/:nonprofit_id/imports
|
||||||
def create
|
def create
|
||||||
render_json{
|
render_json{
|
||||||
|
|
|
@ -4,7 +4,7 @@ module Nonprofits
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
helper_method :current_nonprofit_user?
|
helper_method :current_nonprofit_user?
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def show
|
def show
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class NonprofitKeysController < ApplicationController
|
class NonprofitKeysController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
# get /nonprofits/:nonprofit_id/nonprofit_keys
|
# get /nonprofits/:nonprofit_id/nonprofit_keys
|
||||||
# pass in the :select query param, which is the name of the column of the specific token you want
|
# pass in the :select query param, which is the name of the column of the specific token you want
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Nonprofits
|
||||||
class PaymentsController < ApplicationController
|
class PaymentsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
|
|
||||||
# get /nonprofit/:nonprofit_id/payments
|
# get /nonprofit/:nonprofit_id/payments
|
||||||
|
|
|
@ -3,8 +3,8 @@ module Nonprofits
|
||||||
class PayoutsController < ApplicationController
|
class PayoutsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_admin!, only: :create
|
before_action :authenticate_nonprofit_admin!, only: :create
|
||||||
before_filter :authenticate_nonprofit_user!, only: [:index, :show]
|
before_action :authenticate_nonprofit_user!, only: [:index, :show]
|
||||||
|
|
||||||
def create
|
def create
|
||||||
payout = InsertPayout.with_stripe(current_nonprofit.id, {
|
payout = InsertPayout.with_stripe(current_nonprofit.id, {
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Nonprofits
|
||||||
class RecurringDonationsController < ApplicationController
|
class RecurringDonationsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!, except: [:create]
|
before_action :authenticate_nonprofit_user!, except: [:create]
|
||||||
|
|
||||||
# get /nonprofits/:nonprofit_id/recurring_donations
|
# get /nonprofits/:nonprofit_id/recurring_donations
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Nonprofits
|
||||||
class RefundsController < ApplicationController
|
class RefundsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
# post /charges/:charge_id/refunds
|
# post /charges/:charge_id/refunds
|
||||||
def create
|
def create
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class ReportsController < ApplicationController
|
class ReportsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def end_of_year
|
def end_of_year
|
||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class SupporterEmailsController < ApplicationController
|
class SupporterEmailsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def create
|
def create
|
||||||
if params[:selecting_all]
|
if params[:selecting_all]
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Nonprofits
|
||||||
class SupporterNotesController < ApplicationController
|
class SupporterNotesController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!, except: [:create]
|
before_action :authenticate_nonprofit_user!, except: [:create]
|
||||||
|
|
||||||
# post /nonprofits/:nonprofit_id/supporters/:supporter_id/supporter_notes
|
# post /nonprofits/:nonprofit_id/supporters/:supporter_id/supporter_notes
|
||||||
def create
|
def create
|
||||||
|
|
|
@ -3,8 +3,8 @@ module Nonprofits
|
||||||
class SupportersController < ApplicationController
|
class SupportersController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!, except: [:new, :create]
|
before_action :authenticate_nonprofit_user!, except: [:new, :create]
|
||||||
#before_filter(except: [:create, :mailchimp_landing]){authenticate_min_nonprofit_plan(2)}
|
#before_action(except: [:create, :mailchimp_landing]){authenticate_min_nonprofit_plan(2)}
|
||||||
|
|
||||||
# get /nonprofit/:nonprofit_id/supporters
|
# get /nonprofit/:nonprofit_id/supporters
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class TagJoinsController < ApplicationController
|
class TagJoinsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
render_json do
|
render_json do
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class TagMastersController < ApplicationController
|
class TagMastersController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_action :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
render json: {data:
|
render json: {data:
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
helper_method :current_nonprofit_user?
|
helper_method :current_nonprofit_user?
|
||||||
before_filter :authenticate_nonprofit_user!, only: [:dashboard, :dashboard_metrics, :dashboard_todos, :payment_history, :profile_todos, :recurring_donation_stats, :update, :verify_identity]
|
before_action :authenticate_nonprofit_user!, only: [:dashboard, :dashboard_metrics, :dashboard_todos, :payment_history, :profile_todos, :recurring_donation_stats, :update, :verify_identity]
|
||||||
before_filter :authenticate_super_admin!, only: [:destroy]
|
before_action :authenticate_super_admin!, only: [:destroy]
|
||||||
|
|
||||||
# get /nonprofits/:id
|
# get /nonprofits/:id
|
||||||
# get /:state_code/:city/:name
|
# get /:state_code/:city/:name
|
||||||
|
|
|
@ -3,7 +3,7 @@ class ProfilesController < ApplicationController
|
||||||
|
|
||||||
helper_method :authenticate_profile_owner!
|
helper_method :authenticate_profile_owner!
|
||||||
|
|
||||||
before_filter :authenticate_profile_owner!, only: [:update, :fundraisers, :donations_history]
|
before_action :authenticate_profile_owner!, only: [:update, :fundraisers, :donations_history]
|
||||||
|
|
||||||
# get /profiles/:id
|
# get /profiles/:id
|
||||||
# public profile
|
# public profile
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
class RolesController < ApplicationController
|
class RolesController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_admin!
|
before_action :authenticate_nonprofit_admin!
|
||||||
|
|
||||||
def create
|
def create
|
||||||
role = Role.create_for_nonprofit(params[:role][:name].to_sym, params[:role][:email], FetchNonprofit.with_params(params))
|
role = Role.create_for_nonprofit(params[:role][:name].to_sym, params[:role][:email], FetchNonprofit.with_params(params))
|
||||||
|
|
|
@ -3,7 +3,7 @@ class SettingsController < ApplicationController
|
||||||
include Controllers::NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
helper_method :current_nonprofit_user?
|
helper_method :current_nonprofit_user?
|
||||||
before_filter :authenticate_user!
|
before_action :authenticate_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
if current_role?(:super_admin) && params[:nonprofit_id]
|
if current_role?(:super_admin) && params[:nonprofit_id]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
class SuperAdminsController < ApplicationController
|
class SuperAdminsController < ApplicationController
|
||||||
layout "layouts/page"
|
layout "layouts/page"
|
||||||
|
|
||||||
before_filter :authenticate_super_associate!
|
before_action :authenticate_super_associate!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
class TicketLevelsController < ApplicationController
|
class TicketLevelsController < ApplicationController
|
||||||
include Controllers::EventHelper
|
include Controllers::EventHelper
|
||||||
|
|
||||||
before_filter :authenticate_event_editor!, :except => [:index, :show]
|
before_action :authenticate_event_editor!, :except => [:index, :show]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
ev_id = current_event.id
|
ev_id = current_event.id
|
||||||
|
|
|
@ -3,8 +3,8 @@ class TicketsController < ApplicationController
|
||||||
include Controllers::EventHelper
|
include Controllers::EventHelper
|
||||||
|
|
||||||
helper_method :current_event_admin?, :current_event_editor?
|
helper_method :current_event_admin?, :current_event_editor?
|
||||||
before_filter :authenticate_event_editor!, :except => [:create, :add_note]
|
before_action :authenticate_event_editor!, :except => [:create, :add_note]
|
||||||
before_filter :authenticate_nonprofit_user!, only: [:delete_card_for_ticket]
|
before_action :authenticate_nonprofit_user!, only: [:delete_card_for_ticket]
|
||||||
|
|
||||||
# post /nonprofits/:nonprofit_id/events/:event_id/tickets
|
# post /nonprofits/:nonprofit_id/events/:event_id/tickets
|
||||||
def create
|
def create
|
||||||
|
|
Loading…
Reference in a new issue