This blog has been archived. Our writing has moved to makandra cards.
The blog of , a Ruby on Rails development team

Aegis 2 brings resources to your permissions

Yesterday we released the next major revision of our popular authorization solution Aegis.

Since the inception of Aegis in 2007, the way we write our Rails controllers has changed dramatically. We are now using RESTful routes and slim down controllers with resource_controller and modularity. We're getting more bang for each line of code. It was time for Aegis to catch up.

Aegis 2 lets you describe your permissions using resources, similiar to your routes. Your permission resources can match those in your routes, but don’t have to. Here is how your permission definitions can look like in Aegis 2:

class Permissions < Aegis::Permissions

  role :user
  role :admin

  resources :projects do
    allow :everyone
  end

  resources :users do
    allow :admin
  end

end

You can protect all actions in a controller through an Aegis resource with a single line:

class ProjectsController < ApplicationController
  permissions :projects
end

There are many more new features, including defining permissions for reading or writing actions and a way to check permissions when no user is signed in.

We also started an awesome documentation wiki for Aegis where you can find detailed information on many basic and advanced topics, including:

There is also a migration guide for people who want to bring their Aegis 1 setup up to speed.

Growing Rails Applications in Practice
Check out our e-book:
Learn to structure large Ruby on Rails codebases with the tools you already know and love.

Recent posts

Our address:
makandra GmbH
Werner-von-Siemens-Str. 6
86159 Augsburg
Germany
Contact us:
+49 821 58866 180
info@makandra.de
Commercial register court:
Augsburg Municipal Court
Register number:
HRB 24202
Sales tax identification number:
DE243555898
Chief executive officers:
Henning Koch
Thomas Eisenbarth