README.rdoc in uhees-declarative_authorization-0.3.1 vs README.rdoc in uhees-declarative_authorization-0.3.2.2.1
- old
+ new
@@ -77,18 +77,32 @@
Details on the demonstrated methods can be found in the API docs, either
generated yourself or at http://www.tzi.org/~sbartsch/declarative_authorization
== Controller
-If authentication is in place, enabling user-specific access control may be
-as simple as one call to filter_access_to :all which simply requires the
-according privileges for present actions. E.g. the privilege index_users is
-required for action index. This works as a first default configuration
-for RESTful controllers, with these privileges easily handled in the
-authorization configuration, which will be described below.
+If authentication is in place, there are two ways to enable user-specific
+access control on controller actions. For resource controllers, which more
+or less follow the CRUD pattern, +filter_resource_access+ is the simplest
+approach. It sets up instance variables in before filters and calls
+filter_access_to with the appropriate parameters to protect the CRUD methods.
class EmployeesController < ApplicationController
+ filter_resource_access
+ ...
+ end
+
+See Authorization::AuthorizationInController::ClassMethods for options on
+nested resources and custom member and collection actions.
+
+If you prefer less magic or your controller has no resemblance with the resource
+controllers, directly calling filter_access_to may be the better option. Examples
+are given in the following. E.g. the privilege index users is required for
+action index. This works as a first default configuration for RESTful
+controllers, with these privileges easily handled in the authorization
+configuration, which will be described below.
+
+ class EmployeesController < ApplicationController
filter_access_to :all
def index
...
end
...
@@ -454,11 +468,11 @@
and Ubuntu) and has only been tested under Linux.
= Help and Contact
-We have an issue tracker[http://stffn.lighthouseapp.com/projects/20733-declarative_authorization]
+We have an issue tracker[http://github.com/stffn/declarative_authorization/issues]
for bugs and feature requests as well as a
Google Group[http://groups.google.com/group/declarative_authorization] for
discussions on the usage of the plugin. You are very welcome to contribute.
Just fork the git repository and create a new issue, send a pull request or
contact me personally.
@@ -473,14 +487,17 @@
= Contributors
Thanks to
* Eike Carls
* Erik Dahlstrand
+* Jeroen van Dijk
* Jeremy Friesen
* Brian Langenfeld
+* Georg Ledermann
* Geoff Longman
* Olly Lylo
* Mark Mansour
+* Thomas Maurer
* Mike Vincent
= Licence