Closed gagalago closed 10 years ago
Take a look at the wiki here: https://github.com/nathanl/authority/wiki/Using%20Authority%20on%20Controllers%20that%20don%27t%20have%20a%20resource
You might also find the generic "can?" method useful: https://github.com/nathanl/authority#the_generic_can
Let me know if you're still unsure what to do.
yes thanks. I had not seen that there was a wiki. It might be helpful to the wiki in evidence at the top of readme ?
Wikis are a standard feature of Github repos, so there is a link on the project homepage. But there are a lot of links, so if you don't know to look for it, it's not obvious.
Glad you got an answer. Enjoy using Authority! :)
Is it possible to authorize a controlleur without a resource ?
For example, I have a
PrivateController
which has inindex
the summary table of all the administrative resources. I would like to allow administrators and managers to access this page.the authorizer is easy :
What should I put in the controller to use this authorizer. As I do not realy have model resources associated with my controller, I do not know what I have to put in
authorize_action_for
.