Skip to content
This repository has been archived by the owner on Nov 19, 2019. It is now read-only.

Commit

Permalink
Slight diagram skinnyfication
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Long committed Apr 3, 2012
1 parent 85fca47 commit 73ffdd6
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ Authority encapsulates all authorization logic in `Authorizer` classes. Want to
You can group models under authorizers in any way you wish. For example:


+-------------+ +--------------+ +-------------+
|Simplest case| |Logical groups| |Most granular|
+-------------+ +--------------+ +-------------+
+-------------+ +--------------+ +-------------+
|Simplest case| |Logical groups| |Most granular|
+-------------+ +--------------+ +-------------+

default_strategy default_strategy default_strategy
+ + +
| +--------+-------+ +-------------------+-------------------+
+ + + + + +
EverythingAuthorizer BasicAuthorizer AdminAuthorizer CommentAuthorizer ArticleAuthorizer EditionAuthorizer
+ + + + + +
+-------+-------+ +-+ +------+ | | |
+ + + + + + + + +
Comment Article Edition Comment Article Edition Comment Article Edition
default_strategy default_strategy default_strategy
+ + +
| +--------+-------+ +-------------------+-------------------+
+ + + + + +
EverythingAuthorizer BasicAuthorizer AdminAuthorizer CommentAuthorizer ArticleAuthorizer EditionAuthorizer
+ + + + + +
+-------+-------+ +-+ +------+ | | |
+ + + + + + + + +
Comment Article Edition Comment Article Edition Comment Article Edition


The process generally flows like this:
Expand All @@ -83,8 +83,8 @@ The process generally flows like this:
|
v
MooseAuthorizer.creatable_by?(current_user) # *You define this method.*
+ # If it's missing, the default strategy is used...
|
+ # If it's missing, the default
| # strategy is used...
v
config.default_strategy.call(:creatable, MooseAuthorizer, user) # *You define this strategy.*

Expand Down

0 comments on commit 73ffdd6

Please sign in to comment.