Skip to content
This repository

Aegis tracks whether an action is reading or writing. This allows you to allow or deny all reading or writing actions of a resource:

resources :projects do

  writing do
    allow :admin
  end

  reading do
    allow :everyone
  end

end

By default resources create show and index as reading actions. All other actions (update, create, destroy) are created as writing actions by default.

Defining a reading action

When you define a new custom action, it is considered to be writing by default. You can create a read-only action like this:

action :foo, :writing => false
Something went wrong with that request. Please try again.