README.rdoc in declarative_authorization-0.5.2 vs README.rdoc in declarative_authorization-0.5.3
- old
+ new
@@ -190,17 +190,17 @@
See also Authorization::AuthorizationHelper.
== Models
-There are two destinct features for model security built into this plugin:
+There are two distinct features for model security built into this plugin:
authorizing CRUD operations on objects as well as query rewriting to limit
results according to certain privileges.
See also Authorization::AuthorizationInModel.
-=== Model security for CRUD opterations
+=== Model security for CRUD operations
To activate model security, all it takes is an explicit enabling for each
model that model security should be enforced on, i.e.
class Employee < ActiveRecord::Base
using_access_control
@@ -213,11 +213,11 @@
to the authorization rules. For the application to find out about what
happened if an operation is denied, the filters throw
Authorization::NotAuthorized exceptions.
As access control on read are costly, with possibly lots of objects being
-loaded at a time in one query, checks on read need to be actived explicitly by
+loaded at a time in one query, checks on read need to be activated explicitly by
adding the :include_read option.
=== Query rewriting through named scopes
When retrieving large sets of records from databases, any authorization needs
to be integrated into the query in order to prevent inefficient filtering
@@ -254,10 +254,15 @@
with any user or with a user without any roles. So, if your application has
public pages, :+guest+ can be used to allow access for users that are not
logged in. All other roles are application defined and need to be associated
with users by the application.
+If you need to change the default role, you can do so by adding an initializer
+that contains the following statement:
+
+ Authorization.default_role = :anonymous
+
Privileges, such as :create, may be put into hierarchies to simplify
maintenance. So the example above has the same meaning as
authorization do
role :admin do
@@ -510,15 +515,15 @@
= Contributors
Thanks to John Joseph Bachir, Eike Carls, Dennis Blöte, Kai Chen, Erik Dahlstrand,
Jeroen van Dijk, Alexander Dobriakov, Sebastian Dyck, Ari Epstein, Jeremy Friesen,
-Tim Harper, hollownest, Daniel Kristensen, Brad Langhorst, Brian Langenfeld,
-Georg Ledermann, Geoff Longman, Olly Lylo, Mark Mansour, Thomas Maurer, Sharagoz,
-TJ Singleton, Mike Vincent
+Tim Harper, hollownest, Daniel Kristensen, Jeremy Kleindl, Brad Langhorst, Brian Langenfeld,
+Georg Ledermann, Geoff Longman, Olly Lylo, Mark Mansour, Thomas Maurer, Tyler Pickett, Sharagoz,
+TJ Singleton, Mike Vincent, Joel Westerberg
-= Licence
+= License
Copyright (c) 2008 Steffen Bartsch, TZI, Universität Bremen, Germany
released under the MIT license