Support for threadsafe mode
This commit is contained in:
parent
0c19b7300e
commit
41d69fd6c6
48 changed files with 50 additions and 75 deletions
|
@ -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 BillingSubscriptionsController < ApplicationController
|
class BillingSubscriptionsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_admin!
|
before_filter :authenticate_nonprofit_admin!
|
||||||
|
|
||||||
|
|
|
@ -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 CampaignGiftOptionsController < ApplicationController
|
class CampaignGiftOptionsController < ApplicationController
|
||||||
include CampaignHelper
|
include Controllers::CampaignHelper
|
||||||
|
|
||||||
before_filter :authenticate_campaign_editor!, only: [:create, :destroy, :update, :update_order]
|
before_filter :authenticate_campaign_editor!, only: [:create, :destroy, :update, :update_order]
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
module Campaigns; class CampaignGiftOptionsController < ApplicationController
|
module Campaigns; class CampaignGiftOptionsController < ApplicationController
|
||||||
include CampaignHelper
|
include Controllers::CampaignHelper
|
||||||
|
|
||||||
before_filter :authenticate_campaign_editor!, only: [:index]
|
before_filter :authenticate_campaign_editor!, only: [:index]
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
module Campaigns
|
module Campaigns
|
||||||
class DonationsController < ApplicationController
|
class DonationsController < ApplicationController
|
||||||
include CampaignHelper
|
include Controllers::CampaignHelper
|
||||||
|
|
||||||
before_filter :authenticate_campaign_editor!, only: [:index]
|
before_filter :authenticate_campaign_editor!, only: [:index]
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
module Campaigns
|
module Campaigns
|
||||||
class SupportersController < ApplicationController
|
class SupportersController < ApplicationController
|
||||||
include CampaignHelper
|
include Controllers::CampaignHelper
|
||||||
|
|
||||||
before_filter :authenticate_campaign_editor!, only: [:index]
|
before_filter :authenticate_campaign_editor!, only: [: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 CampaignsController < ApplicationController
|
class CampaignsController < ApplicationController
|
||||||
include 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_filter :authenticate_confirmed_user!, only: [:create, :name_and_id, :duplicate]
|
||||||
|
|
|
@ -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 EmailSettingsController < ApplicationController
|
class EmailSettingsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
||||||
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 EventDiscountsController < ApplicationController
|
class EventDiscountsController < ApplicationController
|
||||||
include EventHelper
|
include Controllers::EventHelper
|
||||||
before_filter :authenticate_event_editor!, :except => [:index]
|
before_filter :authenticate_event_editor!, :except => [:index]
|
||||||
|
|
||||||
def create
|
def create
|
||||||
|
|
|
@ -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 EventsController < ApplicationController
|
class EventsController < ApplicationController
|
||||||
include EventHelper
|
include Controllers::EventHelper
|
||||||
|
|
||||||
helper_method :current_event_editor?
|
helper_method :current_event_editor?
|
||||||
before_filter :authenticate_nonprofit_user!, only: :name_and_id
|
before_filter :authenticate_nonprofit_user!, only: :name_and_id
|
||||||
|
|
|
@ -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 MapsController < ApplicationController
|
class MapsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_super_associate!, only: :all_supporters
|
before_filter :authenticate_super_associate!, only: :all_supporters
|
||||||
before_filter :authenticate_nonprofit_user!, only: [:all_npo_supporters, :specific_npo_supporters]
|
before_filter :authenticate_nonprofit_user!, only: [:all_npo_supporters, :specific_npo_supporters]
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class ActivitiesController < ApplicationController
|
class ActivitiesController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
||||||
# get /nonprofits/:nonprofit_id/supporters/:supporter_id/activities
|
# get /nonprofits/:nonprofit_id/supporters/:supporter_id/activities
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class BankAccountsController < ApplicationController
|
class BankAccountsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_admin!
|
before_filter :authenticate_nonprofit_admin!
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class ButtonController < ApplicationController
|
class ButtonController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
|
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_user!
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class CardsController < ApplicationController
|
class CardsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class ChargesController < ApplicationController
|
class ChargesController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!, only: :index
|
before_filter :authenticate_nonprofit_user!, only: :index
|
||||||
|
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class CustomFieldJoinsController < ApplicationController
|
class CustomFieldJoinsController < ApplicationController
|
||||||
|
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class CustomFieldMastersController < ApplicationController
|
class CustomFieldMastersController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class DonationsController < ApplicationController
|
class DonationsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!, only: [:index, :update]
|
before_filter :authenticate_nonprofit_user!, only: [:index, :update]
|
||||||
before_filter :authenticate_campaign_editor!, only: [:create_offsite]
|
before_filter :authenticate_campaign_editor!, only: [:create_offsite]
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class EmailListsController < ApplicationController
|
class EmailListsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class ImportsController < ApplicationController
|
class ImportsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
# post /nonprofits/:nonprofit_id/imports
|
# post /nonprofits/:nonprofit_id/imports
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class MiscellaneousNpInfosController < ApplicationController
|
class MiscellaneousNpInfosController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
helper_method :current_nonprofit_user?
|
helper_method :current_nonprofit_user?
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class NonprofitKeysController < ApplicationController
|
class NonprofitKeysController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
||||||
# get /nonprofits/:nonprofit_id/nonprofit_keys
|
# get /nonprofits/:nonprofit_id/nonprofit_keys
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class PaymentsController < ApplicationController
|
class PaymentsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class PayoutsController < ApplicationController
|
class PayoutsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_admin!, only: :create
|
before_filter :authenticate_nonprofit_admin!, only: :create
|
||||||
before_filter :authenticate_nonprofit_user!, only: [:index, :show]
|
before_filter :authenticate_nonprofit_user!, only: [:index, :show]
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class RecurringDonationsController < ApplicationController
|
class RecurringDonationsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!, except: [:create]
|
before_filter :authenticate_nonprofit_user!, except: [: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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class RefundsController < ApplicationController
|
class RefundsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class ReportsController < ApplicationController
|
class ReportsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def end_of_year
|
def end_of_year
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class SupporterEmailsController < ApplicationController
|
class SupporterEmailsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
||||||
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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class SupporterNotesController < ApplicationController
|
class SupporterNotesController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!, except: [:create]
|
before_filter :authenticate_nonprofit_user!, except: [: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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class SupportersController < ApplicationController
|
class SupportersController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_user!, except: [:new, :create]
|
before_filter :authenticate_nonprofit_user!, except: [:new, :create]
|
||||||
#before_filter(except: [:create, :mailchimp_landing]){authenticate_min_nonprofit_plan(2)}
|
#before_filter(except: [:create, :mailchimp_landing]){authenticate_min_nonprofit_plan(2)}
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class TagJoinsController < ApplicationController
|
class TagJoinsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -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
|
||||||
module Nonprofits
|
module Nonprofits
|
||||||
class TagMastersController < ApplicationController
|
class TagMastersController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
before_filter :authenticate_nonprofit_user!
|
before_filter :authenticate_nonprofit_user!
|
||||||
|
|
||||||
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 NonprofitsController < ApplicationController
|
class NonprofitsController < ApplicationController
|
||||||
include 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_filter :authenticate_nonprofit_user!, only: [:dashboard, :dashboard_metrics, :dashboard_todos, :payment_history, :profile_todos, :recurring_donation_stats, :update, :verify_identity]
|
||||||
|
|
|
@ -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 RolesController < ApplicationController
|
class RolesController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
before_filter :authenticate_nonprofit_admin!
|
before_filter :authenticate_nonprofit_admin!
|
||||||
|
|
||||||
|
|
|
@ -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 SettingsController < ApplicationController
|
class SettingsController < ApplicationController
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
helper_method :current_nonprofit_user?
|
helper_method :current_nonprofit_user?
|
||||||
before_filter :authenticate_user!
|
before_filter :authenticate_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 TicketLevelsController < ApplicationController
|
class TicketLevelsController < ApplicationController
|
||||||
include EventHelper
|
include Controllers::EventHelper
|
||||||
|
|
||||||
before_filter :authenticate_event_editor!, :except => [:index, :show]
|
before_filter :authenticate_event_editor!, :except => [:index, :show]
|
||||||
|
|
||||||
|
|
|
@ -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 TicketsController < ApplicationController
|
class TicketsController < ApplicationController
|
||||||
include 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_filter :authenticate_event_editor!, :except => [:create, :add_note]
|
||||||
|
|
|
@ -15,10 +15,10 @@ module Commitchange
|
||||||
|
|
||||||
# Custom directories with classes and modules you want to be autoloadable.
|
# Custom directories with classes and modules you want to be autoloadable.
|
||||||
# config.autoload_paths += %W(#{config.root}/extras)
|
# config.autoload_paths += %W(#{config.root}/extras)
|
||||||
config.autoload_paths += Dir["#{config.root}/lib/**/"]
|
config.eager_load_paths += Dir["#{config.root}/lib/**/"]
|
||||||
|
|
||||||
config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')
|
config.paths.add File.join('app', 'api'), glob: File.join('**', '*.rb')
|
||||||
config.autoload_paths += Dir[Rails.root.join('app', 'api', '*')]
|
config.eager_load_paths += Dir[Rails.root.join('app', 'api', '*')]
|
||||||
|
|
||||||
# Only load the plugins named here, in the order given (default is alphabetical).
|
# Only load the plugins named here, in the order given (default is alphabetical).
|
||||||
# :all can be used as a placeholder for all plugins not explicitly named.
|
# :all can be used as a placeholder for all plugins not explicitly named.
|
||||||
|
|
|
@ -52,6 +52,7 @@ Commitchange::Application.configure do
|
||||||
|
|
||||||
config.log_level = :debug
|
config.log_level = :debug
|
||||||
|
|
||||||
|
config.threadsafe!
|
||||||
# Turn this on if you want to mess with code inside /node_modules
|
# Turn this on if you want to mess with code inside /node_modules
|
||||||
# config.browserify_rails.evaluate_node_modules = true
|
# config.browserify_rails.evaluate_node_modules = true
|
||||||
|
|
||||||
|
|
|
@ -41,4 +41,5 @@ Commitchange::Application.configure do
|
||||||
config.log_level = :debug
|
config.log_level = :debug
|
||||||
|
|
||||||
config.action_controller.allow_forgery_protection = false
|
config.action_controller.allow_forgery_protection = false
|
||||||
|
config.threadsafe!
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
|
||||||
require 'import_data'
|
|
||||||
|
|
||||||
module ConstructCustomField
|
|
||||||
|
|
||||||
# Given a row of import data (accessible like a hash)...
|
|
||||||
# - filter out all the custom field keys (prefixed with 'custom:x')
|
|
||||||
# - create an array of hashes for every custom field
|
|
||||||
# - used in Supporter.import
|
|
||||||
def self.from_import_data(supp_id, h)
|
|
||||||
return h.select{|key,_| key =~ /^custom:/}.map{|key,val| {'supporter_id'=>supp_id, 'value'=>val, 'name'=>key.gsub(/^custom:/,'')}}
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
||||||
|
|
|
@ -1,16 +0,0 @@
|
||||||
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
|
||||||
require 'import_data'
|
|
||||||
|
|
||||||
module ConstructTag
|
|
||||||
|
|
||||||
# Given a row of import data (accessible like a hash)...
|
|
||||||
# - use only the 'tags' column from the import row
|
|
||||||
# - split the tags by commas and trim whitespace from the ends
|
|
||||||
# - return an array of hash data for every tag_join to be created
|
|
||||||
# - called from Supporter.import
|
|
||||||
def self.from_import_data(supp_id, h)
|
|
||||||
return [] if h['tags'].blank?
|
|
||||||
return h['tags'].split(';').map(&:strip).map{|name| {'supporter_id' => supp_id, 'name' => name}}
|
|
||||||
end
|
|
||||||
|
|
||||||
end
|
|
|
@ -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
|
||||||
module CampaignHelper
|
module Controllers::CampaignHelper
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
module EventHelper
|
module Controllers::EventHelper
|
||||||
include NonprofitHelper
|
include Controllers::NonprofitHelper
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# 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
|
||||||
module NonprofitHelper
|
module Controllers::NonprofitHelper
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# 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
|
||||||
|
require 'rails/generators'
|
||||||
class Api::EntityGenerator < Rails::Generators::NamedBase
|
class Api::EntityGenerator < Rails::Generators::NamedBase
|
||||||
source_root File.expand_path('../templates', __FILE__)
|
source_root File.expand_path('../templates', __FILE__)
|
||||||
def copy_to_entity
|
def copy_to_entity
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
|
# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later
|
||||||
|
require 'rails/generators'
|
||||||
class Api::ResourceGenerator < Rails::Generators::NamedBase
|
class Api::ResourceGenerator < Rails::Generators::NamedBase
|
||||||
source_root File.expand_path('../templates', __FILE__)
|
source_root File.expand_path('../templates', __FILE__)
|
||||||
def copy_to_resource
|
def copy_to_resource
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# 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
|
||||||
|
require 'rails/generators'
|
||||||
class Api::ValidatorGenerator < Rails::Generators::NamedBase
|
class Api::ValidatorGenerator < Rails::Generators::NamedBase
|
||||||
source_root File.expand_path('../templates', __FILE__)
|
source_root File.expand_path('../templates', __FILE__)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue