We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is there an example of how to use an acl with a Service in version 3? The docs only mention Resources.
The text was updated successfully, but these errors were encountered:
If I'm not wrong you can simply pass a factory argument to your service
factory
Sorry, something went wrong.
Thanks for the tip. I finally got around to upgrading. It would probably helpful to have in the docs. I did the following:
class BusinessACL(object): def __init__(self, request): self.request = request def __acl__(self): business_id = self.request.matchdict['id'] return [ (Allow, 'group:root', ALL_PERMISSIONS), (Allow, 'group:admin-%s' % business_id, 'write'), (Allow, Everyone, 'read'), ] calendar_export = Service( name='calendar', path='/api/business/{id:\d+}/calendar.ics', description="ICS export for business", factory=BusinessACL )
No branches or pull requests
Is there an example of how to use an acl with a Service in version 3? The docs only mention Resources.
The text was updated successfully, but these errors were encountered: