Permalink
Browse files

refactored the manager

  • Loading branch information...
1 parent a25f918 commit 6a7e732e9011e1e2f80bb86571009c7b0c3aae34 @flosse committed Jan 11, 2012
Showing with 296 additions and 289 deletions.
  1. +3 −6 README.markdown
  2. +168 −165 lib/Manager.coffee
  3. +4 −4 lib/Router.coffee
  4. +7 −0 lib/node-xmpp-joap.coffee
  5. +1 −1 lib/stanza.coffee
  6. +4 −2 package.json
  7. +109 −111 spec/Manager.spec.coffee
View
@@ -34,12 +34,9 @@ mgr = new joap.Manager comp
mgr.addClass "User", User, ["name", "age"], ["name"]
# implement the ACL by overriding the method
-mgr.hasPermission = (action) ->
-
- if myACLRules(action.from, action.type, action.class, action.instance)
- true
- else
- false
+mgr.hasPermission = (action, next) ->
+ if myACLRules(action) then next()
+ else next false
```
#### Persistence
Oops, something went wrong.

0 comments on commit 6a7e732

Please sign in to comment.