uhees-declarative_authorization 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (42) hide show
  1. data/CHANGELOG +77 -0
  2. data/MIT-LICENSE +20 -0
  3. data/README.rdoc +490 -0
  4. data/Rakefile +43 -0
  5. data/app/controllers/authorization_rules_controller.rb +235 -0
  6. data/app/controllers/authorization_usages_controller.rb +23 -0
  7. data/app/helpers/authorization_rules_helper.rb +183 -0
  8. data/app/views/authorization_rules/_change.erb +49 -0
  9. data/app/views/authorization_rules/_show_graph.erb +37 -0
  10. data/app/views/authorization_rules/_suggestion.erb +9 -0
  11. data/app/views/authorization_rules/_suggestions.erb +24 -0
  12. data/app/views/authorization_rules/change.html.erb +124 -0
  13. data/app/views/authorization_rules/graph.dot.erb +68 -0
  14. data/app/views/authorization_rules/graph.html.erb +40 -0
  15. data/app/views/authorization_rules/index.html.erb +17 -0
  16. data/app/views/authorization_usages/index.html.erb +36 -0
  17. data/authorization_rules.dist.rb +20 -0
  18. data/config/routes.rb +7 -0
  19. data/garlic_example.rb +20 -0
  20. data/init.rb +5 -0
  21. data/lib/declarative_authorization.rb +15 -0
  22. data/lib/declarative_authorization/authorization.rb +630 -0
  23. data/lib/declarative_authorization/development_support/analyzer.rb +252 -0
  24. data/lib/declarative_authorization/development_support/change_analyzer.rb +253 -0
  25. data/lib/declarative_authorization/development_support/change_supporter.rb +578 -0
  26. data/lib/declarative_authorization/development_support/development_support.rb +243 -0
  27. data/lib/declarative_authorization/helper.rb +60 -0
  28. data/lib/declarative_authorization/in_controller.rb +367 -0
  29. data/lib/declarative_authorization/in_model.rb +150 -0
  30. data/lib/declarative_authorization/maintenance.rb +188 -0
  31. data/lib/declarative_authorization/obligation_scope.rb +297 -0
  32. data/lib/declarative_authorization/rails_legacy.rb +14 -0
  33. data/lib/declarative_authorization/reader.rb +438 -0
  34. data/test/authorization_test.rb +823 -0
  35. data/test/controller_test.rb +418 -0
  36. data/test/dsl_reader_test.rb +157 -0
  37. data/test/helper_test.rb +154 -0
  38. data/test/maintenance_test.rb +41 -0
  39. data/test/model_test.rb +1171 -0
  40. data/test/schema.sql +53 -0
  41. data/test/test_helper.rb +103 -0
  42. metadata +104 -0
data/CHANGELOG ADDED
@@ -0,0 +1,77 @@
1
+ * Allow passing explicit context in addition to object in permitted_to? [Olly Lylo, sb]
2
+
3
+ * Change Supporter: suggest changes to authorization rules [sb]
4
+
5
+ * Added permitted_to!/? in model [Eike Carls]
6
+
7
+ * New test helper: should_(not_)_be_allowed_to(privilege, object_or_context) [sb]
8
+
9
+ ** RELEASE 0.3 (April 20, 2009) **
10
+
11
+ * New option :join_by for has_permission_on to allow AND'ing of statements in one has_permission_on block [sb]
12
+
13
+ * Allow using_access_control to be called directly on ActiveRecord::Base, globally enabling model security [sb]
14
+
15
+ * New operator: intersects_with, comparing two Enumerables in if_attribute [sb]
16
+
17
+ * Improved if_permitted_to syntax: if the attribute is left out, permissions are checked on for the current object [sb]
18
+
19
+ * Added #has_role_with_hierarchy? method to retrieve explicit and calculated roles [jeremyf]
20
+
21
+ * Added a simple rules analyzer to help improve authorization rules [sb]
22
+
23
+ * Gemified plugin. Needed to restructure the lib path contents [sb]
24
+
25
+ * Added handling of Authorization::AuthorizationInController::ClassMethods.filter_access_to parameters that are of the form [:show, :update] instead of just :show, :update. [jeremyf]
26
+
27
+ * Added authorization usage helper for checking filter_access_to usage in controllers [sb]
28
+
29
+ * Added a authorization rules browser. See README for more information [sb]
30
+
31
+ * Added Model.using_access_control? to check if a model has model security activated [sb]
32
+
33
+ * Changed Authorization::ObligationScope#map_table_alias_for [Brian Langenfeld]
34
+ * Fixed to prevent bad aliases from being produced.
35
+
36
+ * Changed Authorization::Attribute#validate? [Brian Langenfeld]
37
+ * Encountering a nil value when evaluating an attribute now raises a NilAttributeValueError, instead of an AuthorizationError. We leave it to the caller to decide what to do about it.
38
+
39
+ * Changed Authorization::Engine#permit! [Brian Langenfeld]
40
+ * We now convert incoming privileges to symbols (e.g. 'read' is made equivalent to :read). This ensures the privileges will match those defined in the authorization rules file.
41
+ * The method now properly infers context when checking against an association (e.g. user.posts). We do this by leveraging ActiveRecord builder method 'new' to instantiate a proper object we can work with.
42
+ * When testing rules for positive results (via Authorization::Attribute#validate?), we now rescue NilAttributeValueError exceptions, simply causing the rule to return a negative result (instead of barfing).
43
+
44
+ * Changed Authorization::ObligationScope#rebuild_join_options! [Brian Langenfeld]
45
+ * If we're dealing with multiple obligations we have to check (i.e. ones that result in OR'd conditions), we now use :include instead of :joins for our generated scope. This does seem like a kludge, but until ActiveRecord scopes support unions (for checking obligations individually and consolidating the results), we don't have much choice. Something to revisit later, for sure.
46
+
47
+ ** RELEASE 0.2 (February 2, 2009) **
48
+
49
+ * added negative operators: is_not, not_in, does_not_contain [sb]
50
+
51
+ * changed user.roles to user.role_symbols to reduce interferance with associations [sb]
52
+
53
+ * Ruby 1.9 and Rails 2.3 compatibility [sb]
54
+
55
+ * if_permitted_to for has_permission_on blocks for DRYer auth rules [sb]
56
+
57
+ * ObligationScope rewrite of query rewriting [Brian Langenfeld]
58
+
59
+ * changed exception hierarchy to begin at StandardError [sb]
60
+
61
+ * :is_in operator [sb]
62
+
63
+ * added has_role? helper [sb]
64
+
65
+ * made plugin thread-safe [sb]
66
+
67
+ * added maintenance and test helpers [sb]
68
+
69
+ * changed default permission denied response to 403 Forbidden [sb]
70
+
71
+ * descriptions for titles and roles [sb]
72
+
73
+ * fixed for PostgreSQL [Mark Mansour]
74
+
75
+ * improved DSL syntax: allow for array of contexts in has_permission_on [sb]
76
+
77
+ ** RELEASE 0.1 (August 22, 2008) **
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2008 [name of plugin creator]
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,490 @@
1
+ = Declarative Authorization
2
+
3
+ The declarative authorization plugin offers an authorization mechanism inspired
4
+ by _RBAC_. The most notable distinction to existing authorization plugins is the
5
+ declarative authorization approach. That is, authorization rules are not
6
+ programmatically in between business logic but in an authorization configuration.
7
+
8
+ Currently, Rails authorization plugins only provide for programmatic
9
+ authorization rules. That is, the developer needs to specify which roles are
10
+ allowed to access a specific controller action or a part of a view, which is
11
+ not DRY. With a growing application code base and functions, as it happens
12
+ especially in agile development processes, it may be decided to introduce new
13
+ roles. Then, at several places of the source code the new group needs to be
14
+ added, possibly leading to omissions and thus hard to test errors. Another
15
+ aspect are changing authorization requirements in development or
16
+ even after taking the application into production. Then, privileges of
17
+ certain roles need to be easily adjusted when the original assumptions
18
+ concerning access control prove unrealistic. In these situations, a
19
+ declarative approach as offered by this plugin increases the development
20
+ and maintenance efficiency.
21
+
22
+ Plugin features
23
+ * Authorization at controller action level
24
+ * Authorization helpers for Views
25
+ * Authorization at model level
26
+ * Authorize CRUD (Create, Read, Update, Delete) activities
27
+ * Query rewriting to automatically only fetch authorized records
28
+ * DSL for specifying Authorization rules in an authorization configuration
29
+
30
+
31
+ Requirements
32
+ * An authentication mechanism
33
+ * User object in Controller#current_user
34
+ * (For model security) Setting Authorization.current_user
35
+ * User objects need to respond to a method :role_symbols that returns an
36
+ array of role symbols
37
+ See below for installation instructions.
38
+
39
+
40
+ = Authorization Data Model
41
+
42
+ ----- App domain ----|-------- Authorization conf ---------|------- App domain ------
43
+
44
+ includes includes
45
+ .--. .---.
46
+ | v | v
47
+ .------. can_play .------. has_permission .------------. requires .----------.
48
+ | User |----------->| Role |----------------->| Permission |<-----------| Activity |
49
+ '------' * * '------' * * '------------' 1 * '----------'
50
+ |
51
+ .-------+------.
52
+ 1 / | 1 \ *
53
+ .-----------. .---------. .-----------.
54
+ | Privilege | | Context | | Attribute |
55
+ '-----------' '---------' '-----------'
56
+
57
+ In the application domain, each *User* may be assigned to *Roles* that should
58
+ define the users' job in the application, such as _Administrator_. On the
59
+ right-hand side of this diagram, application developers specify which *Permissions*
60
+ are necessary for users to perform activities, such as calling a controller action,
61
+ viewing parts of a View or acting on records in the database. Note that
62
+ Permissions consist of an *Privilege* that is to be performed, such as _read_,
63
+ and a *Context* in that the Operation takes place, such as _companies_.
64
+
65
+ In the authorization configuration, Permissions are assigned to Roles and Role
66
+ and Permission hierarchies are defined. *Attributes* may be employed to allow
67
+ authorization according to dynamic information about the context and the
68
+ current user, e.g. "only allow access on employees that belong to the
69
+ current user's branch."
70
+
71
+
72
+ = Examples
73
+
74
+ A fully functional example application can be found at
75
+ http://github.com/stffn/decl_auth_demo_app
76
+
77
+ Details on the demonstrated methods can be found in the API docs, either
78
+ generated yourself or at http://www.tzi.org/~sbartsch/declarative_authorization
79
+
80
+ == Controller
81
+
82
+ If authentication is in place, enabling user-specific access control may be
83
+ as simple as one call to filter_access_to :all which simply requires the
84
+ according privileges for present actions. E.g. the privilege index_users is
85
+ required for action index. This works as a first default configuration
86
+ for RESTful controllers, with these privileges easily handled in the
87
+ authorization configuration, which will be described below.
88
+
89
+ class EmployeesController < ApplicationController
90
+ filter_access_to :all
91
+ def index
92
+ ...
93
+ end
94
+ ...
95
+ end
96
+
97
+ When custom actions are added to such a controller, it helps to define more
98
+ clearly which privileges are the respective requirements. That is when the
99
+ filter_access_to call may become more verbose:
100
+
101
+ class EmployeesController < ApplicationController
102
+ filter_access_to :all
103
+ # this one would be included in :all, but :read seems to be
104
+ # a more suitable privilege than :auto_complete_for_user_name
105
+ filter_access_to :auto_complete_for_employee_name, :require => :read
106
+ def auto_complete_for_employee_name
107
+ ...
108
+ end
109
+ ...
110
+ end
111
+
112
+ For some actions it might be necessary to check certain attributes of the
113
+ object the action is to be acting on. Then, the object needs to be loaded
114
+ before the action's access control is evaluated. On the other hand, some actions
115
+ might prefer the authorization to ignore specific attribute checks as the object is
116
+ unknown at checking time, so attribute checks and thus automatic loading of
117
+ objects needs to be enabled explicitly.
118
+
119
+ class EmployeesController < ApplicationController
120
+ filter_access_to :update, :attribute_check => true
121
+ def update
122
+ # @employee is already loaded from param[:id] because of :attribute_check
123
+ end
124
+ end
125
+
126
+ You can provide the needed object through before_filters. This way, you have
127
+ full control over the object that the conditions are checked against. Just make
128
+ sure, your before_filters occur before any of the filter_access_to calls.
129
+
130
+ class EmployeesController < ApplicationController
131
+ before_filter :new_employee_from_params, :only => :create
132
+ before_filter :new_employee, :only => [:index, :new]
133
+ filter_access_to :all, :attribute_check => true
134
+
135
+ def create
136
+ @employee.save!
137
+ end
138
+
139
+ protected
140
+ def new_employee_from_params
141
+ @employee = Employee.new(params[:employee])
142
+ end
143
+ end
144
+
145
+ If the access is denied, a +permission_denied+ method is called on the
146
+ current_controller, if defined, and the issue is logged.
147
+ For further customization of the filters and object loading, have a look at
148
+ the complete API documentation of filter_access_to in
149
+ Authorization::AuthorizationInController::ClassMethods.
150
+
151
+
152
+ == Views
153
+
154
+ In views, a simple permitted_to? helper makes showing blocks according to the
155
+ current user's privileges easy:
156
+
157
+ <% permitted_to? :create, :employees do %>
158
+ <%= link_to 'New', new_employee_path %>
159
+ <% end %>
160
+
161
+ Only giving a symbol :employees as context prevents any checks of attributes
162
+ as there is no object to check against. For example, in case of nested resources
163
+ a new object may come in handy:
164
+
165
+ <% permitted_to? :create, Branch.new(:company => @company) do
166
+ # or @company.branches.new
167
+ # or even @company.branches %>
168
+ <%= link_to 'New', new_company_branch_path(@company) %>
169
+ <% end %>
170
+
171
+ Lists are straight-forward:
172
+
173
+ <% for employee in @employees %>
174
+ <%= link_to 'Edit', edit_employee_path(employee) if permitted_to? :update, employee %>
175
+ <% end %>
176
+
177
+ See also Authorization::AuthorizationHelper.
178
+
179
+
180
+ == Models
181
+
182
+ There are two destinct features for model security built into this plugin:
183
+ authorizing CRUD operations on objects as well as query rewriting to limit
184
+ results according to certain privileges.
185
+
186
+ See also Authorization::AuthorizationInModel.
187
+
188
+ === Model security for CRUD opterations
189
+ To activate model security, all it takes is an explicit enabling for each
190
+ model that model security should be enforced on, i.e.
191
+
192
+ class Employee < ActiveRecord::Base
193
+ using_access_control
194
+ ...
195
+ end
196
+
197
+ Thus,
198
+ Employee.create(...)
199
+ fails, if the current user is not allowed to :create :employees according
200
+ to the authorization rules. For the application to find out about what
201
+ happened if an operation is denied, the filters throw
202
+ Authorization::NotAuthorized exceptions.
203
+
204
+ As access control on read are costly, with possibly lots of objects being
205
+ loaded at a time in one query, checks on read need to be actived explicitly by
206
+ adding the :include_read option.
207
+
208
+ === Query rewriting using named scopes
209
+ When retrieving large sets of records from databases, any authorization needs
210
+ to be integrated into the query in order to prevent inefficient filtering
211
+ afterwards and to use LIMIT and OFFSET in SQL statements. To keep authorization
212
+ rules out of the source code, this plugin offers query rewriting mechanisms
213
+ through named scopes. Thus,
214
+
215
+ Employee.with_permissions_to(:read)
216
+
217
+ returns all employee records that the current user is authorized to read. In
218
+ addition, just like normal named scopes, query rewriting may be chained with
219
+ the usual find method:
220
+
221
+ Employee.with_permissions_to(:read).find(:all, :conditions => ...)
222
+
223
+ If the current user is completely missing the permissions, an
224
+ Authorization::NotAuthorized exception is raised. Through
225
+ Model.obligation_conditions, application developers may retrieve
226
+ the conditions for manual rewrites.
227
+
228
+
229
+ == Authorization Rules
230
+
231
+ Authorization rules are defined in config/authorization_rules.rb. E.g.
232
+
233
+ authorization do
234
+ role :admin do
235
+ has_permission_on :employees, :to => [:create, :read, :update, :delete]
236
+ end
237
+ end
238
+
239
+ There is a default role :+guest+ that is used if a request is not associated
240
+ with any user or with a user without any roles. So, if your application has
241
+ public pages, :+guest+ can be used to allow access for users that are not
242
+ logged in. All other roles are application defined and need to be associated
243
+ with users by the application.
244
+
245
+ Privileges, such as :create, may be put into hierarchies to simplify
246
+ maintenance. So the example above has the same meaning as
247
+
248
+ authorization do
249
+ role :admin do
250
+ has_permission_on :employees, :to => :manage
251
+ end
252
+ end
253
+
254
+ privileges do
255
+ privilege :manage do
256
+ includes :create, :read, :update, :delete
257
+ end
258
+ end
259
+
260
+ Privilege hierarchies may be context-specific, e.g. applicable to :employees.
261
+
262
+ privileges do
263
+ privilege :manage, :employees, :includes => :increase_salary
264
+ end
265
+
266
+ For more complex use cases, authorizations need to be based on attributes. E.g.
267
+ if a branch admin should manage only employees of his branch (see
268
+ Authorization::Reader in the API docs for a full list of available operators):
269
+
270
+ authorization do
271
+ role :branch_admin do
272
+ has_permission_on :employees do
273
+ to :manage
274
+ # user refers to the current_user when evaluating
275
+ if_attribute :branch => is {user.branch}
276
+ end
277
+ end
278
+ end
279
+
280
+ To reduce redundancy in has_permission_on blocks, a rule may depend on
281
+ permissions on associated objects:
282
+
283
+ authorization do
284
+ role :branch_admin do
285
+ has_permission_on :branches, :to => :manage do
286
+ if_attribute :managers => contains {user}
287
+ end
288
+
289
+ has_permission_on :employees, :to => :manage do
290
+ if_permitted_to :manage, :branch
291
+ # instead of
292
+ #if_attribute :branch => {:managers => contains {user}}
293
+ end
294
+ end
295
+ end
296
+
297
+ Lastly, not only privileges may be organized in a hierarchy but roles as well.
298
+ Here, project manager inherit the permissions of employees.
299
+
300
+ role :project_manager do
301
+ includes :employee
302
+ end
303
+
304
+ See also Authorization::Reader.
305
+
306
+ == Testing
307
+
308
+ declarative_authorization provides a few helpers to ease the testing with
309
+ authorization in mind.
310
+
311
+ In your test_helper.rb, to enable the helpers add
312
+
313
+ require File.expand_path(File.dirname(__FILE__) +
314
+ "/../vendor/plugins/declarative_authorization/lib/maintenance")
315
+
316
+ class Test::Unit::TestCase
317
+ include Authorization::TestHelper
318
+ ...
319
+ end
320
+
321
+ Now, in unit tests, you may deactivate authorization if needed e.g. for test
322
+ setup and assume certain identities for tests:
323
+
324
+ class EmployeeTest < ActiveSupport::TestCase
325
+ def test_should_read
326
+ without_access_control do
327
+ Employee.create(...)
328
+ end
329
+ assert_nothing_raised do
330
+ with_user(admin) do
331
+ Employee.find(:first)
332
+ end
333
+ end
334
+ end
335
+ end
336
+
337
+ In functional tests, get, posts, etc. may be tested in the name of certain users:
338
+
339
+ get_with admin, :index
340
+ post_with admin, :update, :employee => {...}
341
+
342
+ See Authorization::TestHelper for more information.
343
+
344
+
345
+ = Installation of declarative_authorization
346
+
347
+ One of three options to install the plugin:
348
+ * Install by Gem: Add to your environment.rb in the initializer block:
349
+ config.gem "stffn-declarative_authorization", :lib => "declarative_authorization"
350
+ And call from your application's root directory
351
+ rake gems:install
352
+ * Alternatively, to install from github, execute in your application's root directory
353
+ cd vendor/plugins && git clone git://github.com/stffn/declarative_authorization.git
354
+ * Or, download one of the released versions from Github at
355
+ http://github.com/stffn/declarative_authorization/downloads
356
+
357
+ Then,
358
+ * provide the requirements as noted below,
359
+ * create a basic config/authorization_rules.rb--you might want to take the
360
+ provided example authorization_rules.dist.rb in the plugin root as a starting
361
+ point,
362
+ * add +filter_access_to+, +permitted_to+? and model security as needed.
363
+
364
+ == Providing the Plugin's Requirements
365
+ The requirements are
366
+ * Rails >= 2.1 and Ruby >= 1.8.6, including 1.9
367
+ * An authentication mechanism
368
+ * A user object returned by Controller#current_user
369
+ * An array of role symbols returned by User#role_symbols
370
+ * (For model security) Setting Authorization.current_user to the request's user
371
+
372
+ Of the various ways to provide these requirements, here is one way employing
373
+ restful_authentication.
374
+
375
+ * Install restful_authentication
376
+ cd vendor/plugins && git clone git://github.com/technoweenie/restful-authentication.git restful_authentication
377
+ cd ../.. && ruby script/generate authenticated user sessions
378
+ * Move "include AuthenticatedSystem" to ApplicationController
379
+ * Add +filter_access_to+ calls as described above.
380
+ * If you'd like to use model security, add a before_filter that sets the user
381
+ globally to your ApplicationController. This is thread-safe.
382
+ before_filter :set_current_user
383
+ protected
384
+ def set_current_user
385
+ Authorization.current_user = current_user
386
+ end
387
+
388
+ * Add roles field to the User model through a :+has_many+ association
389
+ (this is just one possible approach; you could just as easily use
390
+ :+has_many+ :+through+ or a serialized roles array):
391
+ * create a migration for table roles
392
+ class CreateRoles < ActiveRecord::Migration
393
+ def self.up
394
+ create_table "roles" do |t|
395
+ t.column :title, :string
396
+ t.references :user
397
+ end
398
+ end
399
+
400
+ def self.down
401
+ drop_table "roles"
402
+ end
403
+ end
404
+
405
+ * create a model Role,
406
+ class Role < ActiveRecord::Base
407
+ belongs_to :user
408
+ end
409
+
410
+ * add +has_many+ :+roles+ to the User model and a roles method that returns the roles
411
+ as an Array of Symbols, e.g.
412
+ class User < ActiveRecord::Base
413
+ has_many :roles
414
+ def role_symbols
415
+ (roles || []).map {|r| r.title.to_sym}
416
+ end
417
+ end
418
+
419
+ * add roles to your User objects using e.g.
420
+ user.roles.create(:title => "admin")
421
+
422
+ Note: If you choose to generate an Account model for restful_authentication
423
+ instead of a User model as described above, you have to customize the
424
+ examples and create a ApplicationController#current_user method.
425
+
426
+
427
+ == Debugging Authorization
428
+
429
+ Currently, the main means of debugging authorization decisions is logging and
430
+ exceptions. Denied access to actions is logged to +warn+ or +info+, including
431
+ some hints about what went wrong.
432
+
433
+ All bang methods throw exceptions which may be used to retrieve more
434
+ information about a denied access than a Boolean value.
435
+
436
+
437
+ == Authorization Browser
438
+
439
+ If your authorization rules become more complex, you might be glad to use
440
+ the authorization rules browser that comes with declarative_authorization.
441
+ It has a syntax-highlighted and a graphical view with filtering of the current
442
+ authorization rules.
443
+
444
+ By default, it will only be available in development mode. To use it, add
445
+ the following lines to your authorization_rules.rb for the appropriate role:
446
+
447
+ has_permission_on :authorization_rules, :to => :read
448
+
449
+ Then, point your browser to
450
+ http://localhost/authorization_rules
451
+
452
+ The browser needs Rails 2.3 (for Engine support). The graphical view requires
453
+ Graphviz (which e.g. can be installed through the graphviz package under Debian
454
+ and Ubuntu) and has only been tested under Linux.
455
+
456
+
457
+ = Help and Contact
458
+
459
+ We have an issue tracker[http://stffn.lighthouseapp.com/projects/20733-declarative_authorization]
460
+ for bugs and feature requests as well as a
461
+ Google Group[http://groups.google.com/group/declarative_authorization] for
462
+ discussions on the usage of the plugin. You are very welcome to contribute.
463
+ Just fork the git repository and create a new issue, send a pull request or
464
+ contact me personally.
465
+
466
+ Maintained by
467
+
468
+ Steffen Bartsch
469
+ TZI, Universität Bremen, Germany
470
+ sbartsch at tzi.org
471
+
472
+
473
+ = Contributors
474
+
475
+ Thanks to
476
+ * Eike Carls
477
+ * Erik Dahlstrand
478
+ * Jeremy Friesen
479
+ * Brian Langenfeld
480
+ * Geoff Longman
481
+ * Olly Lylo
482
+ * Mark Mansour
483
+ * Mike Vincent
484
+
485
+
486
+ = Licence
487
+
488
+ Copyright (c) 2008 Steffen Bartsch, TZI, Universität Bremen, Germany
489
+ released under the MIT license
490
+