Commit 91488193 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Rename before_filter to before_action

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent f502b293
class Admin::AppearancesController < Admin::ApplicationController class Admin::AppearancesController < Admin::ApplicationController
before_filter :set_appearance, except: :create before_action :set_appearance, except: :create
def show def show
end end
......
class Admin::GitHooksController < Admin::ApplicationController class Admin::GitHooksController < Admin::ApplicationController
before_filter :git_hook before_action :git_hook
respond_to :html respond_to :html
......
class AuditEventsController < ApplicationController class AuditEventsController < ApplicationController
# Authorize # Authorize
before_filter :repository, only: :project_log before_action :repository, only: :project_log
before_filter :authorize_admin_project!, only: :project_log before_action :authorize_admin_project!, only: :project_log
before_filter :group, only: :group_log before_action :group, only: :group_log
before_filter :authorize_admin_group!, only: :group_log before_action :authorize_admin_group!, only: :group_log
layout :determine_layout layout :determine_layout
......
class Groups::HooksController < Groups::ApplicationController class Groups::HooksController < Groups::ApplicationController
# Authorize # Authorize
before_filter :group before_action :group
before_filter :authorize_admin_group! before_action :authorize_admin_group!
respond_to :html respond_to :html
......
class Groups::LdapsController < Groups::ApplicationController class Groups::LdapsController < Groups::ApplicationController
before_filter :group before_action :group
before_filter :authorize_admin_group! before_action :authorize_admin_group!
def reset_access def reset_access
LdapGroupResetService.new.execute(group, current_user) LdapGroupResetService.new.execute(group, current_user)
......
class Projects::GitHooksController < Projects::ApplicationController class Projects::GitHooksController < Projects::ApplicationController
# Authorize # Authorize
before_filter :authorize_admin_project! before_action :authorize_admin_project!
respond_to :html respond_to :html
......
class Projects::GroupLinksController < Projects::ApplicationController class Projects::GroupLinksController < Projects::ApplicationController
layout 'project_settings' layout 'project_settings'
before_filter :authorize_admin_project! before_action :authorize_admin_project!
def index def index
@group_links = project.project_group_links.all @group_links = project.project_group_links.all
......
...@@ -2,7 +2,7 @@ class Projects::UploadsController < Projects::ApplicationController ...@@ -2,7 +2,7 @@ class Projects::UploadsController < Projects::ApplicationController
layout 'project' layout 'project'
# We want to skip these filters for only the `show` action if `image?` is true, # We want to skip these filters for only the `show` action if `image?` is true,
# but `skip_before_filter` doesn't work with both `only` and `if`, so we accomplish the same like this. # but `skip_before_action` doesn't work with both `only` and `if`, so we accomplish the same like this.
skipped_filters = [:authenticate_user!, :reject_blocked!, :project, :repository] skipped_filters = [:authenticate_user!, :reject_blocked!, :project, :repository]
skip_before_action *skipped_filters, only: [:show] skip_before_action *skipped_filters, only: [:show]
before_action *skipped_filters, only: [:show], unless: :image? before_action *skipped_filters, only: [:show], unless: :image?
......
class ProjectsController < ApplicationController class ProjectsController < ApplicationController
prepend_before_filter :render_go_import, only: [:show] prepend_before_action :render_go_import, only: [:show]
skip_before_action :authenticate_user!, only: [:show] skip_before_action :authenticate_user!, only: [:show]
before_action :project, except: [:new, :create] before_action :project, except: [:new, :create]
before_action :repository, except: [:new, :create] before_action :repository, except: [:new, :create]
......
class UnsubscribesController < ApplicationController class UnsubscribesController < ApplicationController
skip_before_filter :authenticate_user!, skip_before_action :authenticate_user!,
:reject_blocked, :set_current_user_for_observers, :reject_blocked, :set_current_user_for_observers,
:add_abilities :add_abilities
layout 'public_users' layout 'public_users'
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment