Corrected with rubocop cop 'Rails/ActionFilter'.

This commit is contained in:
Thorsten Eckel 2015-05-07 13:23:55 +02:00
parent 3eaac7009a
commit 1e4f47acde
34 changed files with 37 additions and 41 deletions

View file

@ -173,10 +173,6 @@ Style/Documentation:
Description: 'Document classes and non-namespace modules.'
Enabled: false
Rails/ActionFilter:
Description: 'Enforces consistent use of action filter methods.'
Enabled: false
Style/SignalException:
Description: 'Checks for proper usage of fail and raise.'
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class ActivityStreamController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
# GET /api/v1/activity_stream
def show

View file

@ -14,12 +14,12 @@ class ApplicationController < ActionController::Base
:mode_show_rendeder,
:model_index_render
skip_before_filter :verify_authenticity_token
before_filter :set_user, :session_update
before_filter :cors_preflight_check
skip_before_action :verify_authenticity_token
before_action :set_user, :session_update
before_action :cors_preflight_check
after_filter :set_access_control_headers
after_filter :trigger_events
after_action :set_access_control_headers
after_action :trigger_events
# For all responses in this controller, return the CORS access control headers.
def set_access_control_headers

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class ChannelsController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class EmailAddressesController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class GroupsController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -3,7 +3,7 @@
require 'icalendar'
class IcalTicketsController < ApplicationController
before_filter { authentication_check_action_token 'iCal' }
before_action { authentication_check_action_token 'iCal' }
# @path [GET] /ical/tickets_all/:action_token
#

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class JobsController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
def index
return if deny_if_not_role(Z_ROLENAME_ADMIN)

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class LinksController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
# GET /api/v1/links
def index

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class NetworksController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
# GET /networks
# GET /networks.json

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class ObjectManagerAttributesController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
# GET /object_manager_attributes_list
def list

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class OnlineNotificationsController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class OrganizationsController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class OverviewsController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class PackagesController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
# GET /api/v1/packages
def index

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class PostmasterFiltersController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class RecentViewController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class RolesController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class RssController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class SearchController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
# GET /api/v1/search_user_org
def search_user_org

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class SettingsController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
# GET /settings
def index

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class SignaturesController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class SlasController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class TagsController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
# GET /api/v1/tags
def index

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class TaskbarController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
def index

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class TemplatesController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class TextModulesController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
=begin

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class TicketArticlesController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
# GET /articles
def index

View file

@ -3,7 +3,7 @@
require 'ticket/overviews'
class TicketOverviewsController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
# GET /api/v1/ticket_overviews
def show

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class TicketPrioritiesController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
# GET /ticket_priorities
def index

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class TicketStatesController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
# GET /ticket_states
def index

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class TicketsController < ApplicationController
before_filter :authentication_check
before_action :authentication_check
# GET /api/v1/tickets
def index

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class TranslationsController < ApplicationController
before_filter :authentication_check, except: [:load]
before_action :authentication_check, except: [:load]
# GET /translations/lang/:locale
def load

View file

@ -1,7 +1,7 @@
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
class UsersController < ApplicationController
before_filter :authentication_check, except: [:create, :password_reset_send, :password_reset_verify]
before_action :authentication_check, except: [:create, :password_reset_send, :password_reset_verify]
# @path [GET] /users
#