Forums | Admin

Discussion Forums: open-discussion

Start New Thread Start New Thread

 

By: René van den Berg
RE: Multiple methods on Privilege.resource [ reply ]  
2009-12-29 09:26
I would say, make it possible, possibly in a separate method like Privilege.resources(privilege_set, methods, action = "POST") where methods is an array of method names. This is pretty consistent with the single-method version, easy to implement (methods.each |m| do resource(privilege_set, m, action) end) and a great extension to user-friendliness.

It would allow client code to specify complete privilege-sets at once, instead of going over them method-by-method, and this extends your API and its usability in a nice way.

By: Bert Meerman
Multiple methods on Privilege.resource [ reply ]  
2009-12-28 15:58
Privilege.resource now takes only a single controller method. For example:
Privilege.resource :cbac_administration, "cbac/permissions/index"
Should it be possible to add multiple controller methods in a single call?

If so, how should the API look like?