Corrected with rubocop cop 'Rails/ActionFilter'.
This commit is contained in:
parent
3eaac7009a
commit
1e4f47acde
34 changed files with 37 additions and 41 deletions
|
@ -173,10 +173,6 @@ Style/Documentation:
|
||||||
Description: 'Document classes and non-namespace modules.'
|
Description: 'Document classes and non-namespace modules.'
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
Rails/ActionFilter:
|
|
||||||
Description: 'Enforces consistent use of action filter methods.'
|
|
||||||
Enabled: false
|
|
||||||
|
|
||||||
Style/SignalException:
|
Style/SignalException:
|
||||||
Description: 'Checks for proper usage of fail and raise.'
|
Description: 'Checks for proper usage of fail and raise.'
|
||||||
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
|
StyleGuide: 'https://github.com/bbatsov/ruby-style-guide#fail-method'
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class ActivityStreamController < ApplicationController
|
class ActivityStreamController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
# GET /api/v1/activity_stream
|
# GET /api/v1/activity_stream
|
||||||
def show
|
def show
|
||||||
|
|
|
@ -14,12 +14,12 @@ class ApplicationController < ActionController::Base
|
||||||
:mode_show_rendeder,
|
:mode_show_rendeder,
|
||||||
:model_index_render
|
:model_index_render
|
||||||
|
|
||||||
skip_before_filter :verify_authenticity_token
|
skip_before_action :verify_authenticity_token
|
||||||
before_filter :set_user, :session_update
|
before_action :set_user, :session_update
|
||||||
before_filter :cors_preflight_check
|
before_action :cors_preflight_check
|
||||||
|
|
||||||
after_filter :set_access_control_headers
|
after_action :set_access_control_headers
|
||||||
after_filter :trigger_events
|
after_action :trigger_events
|
||||||
|
|
||||||
# For all responses in this controller, return the CORS access control headers.
|
# For all responses in this controller, return the CORS access control headers.
|
||||||
def set_access_control_headers
|
def set_access_control_headers
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class ChannelsController < ApplicationController
|
class ChannelsController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class EmailAddressesController < ApplicationController
|
class EmailAddressesController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class GroupsController < ApplicationController
|
class GroupsController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
require 'icalendar'
|
require 'icalendar'
|
||||||
|
|
||||||
class IcalTicketsController < ApplicationController
|
class IcalTicketsController < ApplicationController
|
||||||
before_filter { authentication_check_action_token 'iCal' }
|
before_action { authentication_check_action_token 'iCal' }
|
||||||
|
|
||||||
# @path [GET] /ical/tickets_all/:action_token
|
# @path [GET] /ical/tickets_all/:action_token
|
||||||
#
|
#
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class JobsController < ApplicationController
|
class JobsController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
def index
|
def index
|
||||||
return if deny_if_not_role(Z_ROLENAME_ADMIN)
|
return if deny_if_not_role(Z_ROLENAME_ADMIN)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class LinksController < ApplicationController
|
class LinksController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
# GET /api/v1/links
|
# GET /api/v1/links
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class NetworksController < ApplicationController
|
class NetworksController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
# GET /networks
|
# GET /networks
|
||||||
# GET /networks.json
|
# GET /networks.json
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class ObjectManagerAttributesController < ApplicationController
|
class ObjectManagerAttributesController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
# GET /object_manager_attributes_list
|
# GET /object_manager_attributes_list
|
||||||
def list
|
def list
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class OnlineNotificationsController < ApplicationController
|
class OnlineNotificationsController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class OrganizationsController < ApplicationController
|
class OrganizationsController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class OverviewsController < ApplicationController
|
class OverviewsController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class PackagesController < ApplicationController
|
class PackagesController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
# GET /api/v1/packages
|
# GET /api/v1/packages
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class PostmasterFiltersController < ApplicationController
|
class PostmasterFiltersController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class RecentViewController < ApplicationController
|
class RecentViewController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class RolesController < ApplicationController
|
class RolesController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class RssController < ApplicationController
|
class RssController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class SearchController < ApplicationController
|
class SearchController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
# GET /api/v1/search_user_org
|
# GET /api/v1/search_user_org
|
||||||
def search_user_org
|
def search_user_org
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class SettingsController < ApplicationController
|
class SettingsController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
# GET /settings
|
# GET /settings
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class SignaturesController < ApplicationController
|
class SignaturesController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class SlasController < ApplicationController
|
class SlasController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class TagsController < ApplicationController
|
class TagsController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
# GET /api/v1/tags
|
# GET /api/v1/tags
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class TaskbarController < ApplicationController
|
class TaskbarController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
def index
|
def index
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class TemplatesController < ApplicationController
|
class TemplatesController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class TextModulesController < ApplicationController
|
class TextModulesController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
=begin
|
=begin
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class TicketArticlesController < ApplicationController
|
class TicketArticlesController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
# GET /articles
|
# GET /articles
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
require 'ticket/overviews'
|
require 'ticket/overviews'
|
||||||
|
|
||||||
class TicketOverviewsController < ApplicationController
|
class TicketOverviewsController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
# GET /api/v1/ticket_overviews
|
# GET /api/v1/ticket_overviews
|
||||||
def show
|
def show
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class TicketPrioritiesController < ApplicationController
|
class TicketPrioritiesController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
# GET /ticket_priorities
|
# GET /ticket_priorities
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class TicketStatesController < ApplicationController
|
class TicketStatesController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
# GET /ticket_states
|
# GET /ticket_states
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class TicketsController < ApplicationController
|
class TicketsController < ApplicationController
|
||||||
before_filter :authentication_check
|
before_action :authentication_check
|
||||||
|
|
||||||
# GET /api/v1/tickets
|
# GET /api/v1/tickets
|
||||||
def index
|
def index
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class TranslationsController < ApplicationController
|
class TranslationsController < ApplicationController
|
||||||
before_filter :authentication_check, except: [:load]
|
before_action :authentication_check, except: [:load]
|
||||||
|
|
||||||
# GET /translations/lang/:locale
|
# GET /translations/lang/:locale
|
||||||
def load
|
def load
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
# Copyright (C) 2012-2014 Zammad Foundation, http://zammad-foundation.org/
|
||||||
|
|
||||||
class UsersController < ApplicationController
|
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
|
# @path [GET] /users
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue