wichert / rest_toolkit

Simple REST servers
http://rest-toolkit.rtfd.org/
BSD 2-Clause "Simplified" License
36 stars 7 forks source link

Adding ACL through a factory-object #18

Closed peletiah closed 8 years ago

peletiah commented 8 years ago

This project looks very promising, I really like the effort you put into a proper and thorough documentation!

I'm looking into using this together with ziggurat foundations and I have a basic question about permissions:

Can I add an ACL defined in a factory-object to an REST resource, analogous to the factory-argument in pyramid.config.Configurator.add_route?

wichert commented 8 years ago

You don't need to: the resource itself is the context. What you will need to do is put the __acl__ on the resource itself, as you can see in the security chapter of the documentation.