#10 ✓resolved
Steffen Bartsch

DRY up filter_access_to calls

Reported by Steffen Bartsch | February 12th, 2009 @ 02:58 PM

Currently, the default REST case still requires a few filter_access_to calls, such as:


class EmployeesController < ApplicationController
  before_filter :new_employee, :only => :create
  filter_access_to :all
  filter_access_to :create, :show, :edit, :update,
      :destroy, :attribute_check => true

  ...

  protected
  def new_employee
    @employee = Employee.new(params[:employee])
  end
end

Is there a way to reduce the amount of filter_access_to calls? Maybe


restful_access_filters
# calls:
#filter_access_to :all
#filter_access_to :create, :show, :edit, :update,
#   :destroy, :attribute_check => true

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

By now, decl_auth is using the GitHub issue tracker as well. Please use the one over there: http://github.com/stffn/declarative_authorization/issues

People watching this ticket

Referenced by

Pages