Multiple permissions in view_config decorator?

社会主义新天地 提交于 2019-12-06 23:07:16

问题


I am configuring access control for a web application based on the Pyramid framework. I am setting up permissions for my view callables using the @view_config decorator. I have two permissions, namely 'read' and 'write'. Now, I want certain views to require both permissions. I was unable to figure out how to do this with view_config - am I missing something, or is there maybe another way to do this?


回答1:


Make a readwrite permission. Each view gets one and only one permission but each principal can be mapped to many permissions.



来源:https://stackoverflow.com/questions/15055029/multiple-permissions-in-view-config-decorator

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!